From 104ea3ba592d5081acf106b76f22761048797013 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Thu, 18 Feb 2021 17:48:52 +0100 Subject: [PATCH] fix #4274 @0.5 --- js/libs/fluidbook/fluidbook.contentlock.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 () { -- 2.39.5