]> _ Git - fluidbook-html5.git/commitdiff
fix #3430 @0:10
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 21 Feb 2020 15:53:30 +0000 (16:53 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 21 Feb 2020 15:53:30 +0000 (16:53 +0100)
js/libs/fluidbook/fluidbook.nav.js

index 1861c3c40c050794b41508ce61b789810a486065..fc37ae13ff2587de85c81783606fa8a09ed4608a 100644 (file)
@@ -887,6 +887,8 @@ FluidbookNav.prototype = {
             loopIndex = 0,
             html = '<ul id="chapterList">';
 
+        var $this=this;
+
         // Loop through all chapters and build new ULs based on level/depth
         chapters.forEach(function (chapter) {
             loopIndex++;
@@ -908,7 +910,7 @@ FluidbookNav.prototype = {
 
             currentLevel = chapter.level;
 
-            var page = (this.fluidbook.virtualToPhysical(chapter.page));
+            var page = ($this.fluidbook.virtualToPhysical(chapter.page));
 
             html += '<li><a href="#/page/' + page + '" class="level-' + chapter.level + '">' + chapter.label + '</a>';
         });