From: Vincent Vanwaelscappel Date: Thu, 18 Feb 2021 16:48:52 +0000 (+0100) Subject: fix #4274 @0.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=104ea3ba592d5081acf106b76f22761048797013;p=fluidbook-html5.git fix #4274 @0.5 --- diff --git a/js/libs/fluidbook/fluidbook.contentlock.js b/js/libs/fluidbook/fluidbook.contentlock.js index 187430ec..0d367a3f 100644 --- a/js/libs/fluidbook/fluidbook.contentlock.js +++ b/js/libs/fluidbook/fluidbook.contentlock.js @@ -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 () {