]> _ Git - fluidbook-html5.git/commitdiff
fix issue produced by adding diff to array.prototype
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 23 Jun 2017 13:56:05 +0000 (15:56 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 23 Jun 2017 13:56:05 +0000 (15:56 +0200)
js/libs/fluidbook/fluidbook.nav.js
js/libs/fluidbook/fluidbook.utils.js

index f2781d1f01fd8488659a6b3b83edd86512048b99..cbba0fbc493b3b4e5f39f3f67e0892d1c7afa5d2 100644 (file)
@@ -84,7 +84,7 @@ FluidbookNav.prototype = {
 
 
         var all = "index,chapters,print,friend,bookmark,archives,basket,fullscreen,sound,3d,help".split(",");
-        var hide = all.diff(this.fluidbook.datas.navOrder);
+        var hide = array_diff(all, this.fluidbook.datas.navOrder);
         var loop = [].concat(this.fluidbook.datas.navOrder).concat(hide);
 
         for (var e in loop) {
index 6607d2cd68354db0d75a8c32a2f01574422a8903..d7d220b8c40377c4c473dedc8c2f688286a6bce3 100644 (file)
@@ -76,8 +76,8 @@ function blur() {
     }
 }
 
-Array.prototype.diff = function (a) {
-    return this.filter(function (i) {
-        return a.indexOf(i) < 0;
+function array_diff(a,b){
+    return a.filter(function (i) {
+        return b.indexOf(i) < 0;
     });
-};
\ No newline at end of file
+}
\ No newline at end of file