]> _ Git - fluidbook-html5.git/commitdiff
fix #4274 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 18 Feb 2021 16:48:52 +0000 (17:48 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 18 Feb 2021 16:48:52 +0000 (17:48 +0100)
js/libs/fluidbook/fluidbook.contentlock.js

index 187430ec215fb7f8c7e71dc1bd4023b226003f96..0d367a3f6e9e105eeb51b3ec30152325348afdf0 100644 (file)
@@ -13,7 +13,7 @@ FluidbookContentLock.prototype = {
             $this.setMaxPage();
         });
 
-        this.maxPage = this.getNextLockPage();
+        this.maxPage = Math.min(this.getNextLockPage(), this.fluidbook.settings.pages);
         if (this.maxPage <= 0) {
             this.maxPage = this.fluidbook.settings.pages;
         }
@@ -54,7 +54,7 @@ FluidbookContentLock.prototype = {
     },
 
     getMaxPage: function () {
-        return this.maxPage;
+        return Math.min(this.fluidbook.settings.pages, this.maxPage);
     },
 
     updateMaxPage: function () {