]> _ Git - fluidbook-html5.git/commitdiff
wip #4450 @0:10
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 4 May 2021 12:32:22 +0000 (14:32 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 4 May 2021 12:32:22 +0000 (14:32 +0200)
js/libs/fluidbook/fluidbook.links.js

index 1c9f5d463c9a2b082bd7fa86914ee93dab7334fd..ec21e7d756bd9ac20a2ece9ff8a0715dadebb129 100644 (file)
@@ -166,7 +166,7 @@ FluidbookLinks.prototype = {
             var showid = [];
             if (mode === 'pickrandom') {
                 while (true) {
-                    var ids = $(this).data('showid').split(',');
+                    var ids = $(this).data('showid').toString().split(',');
                     var idx = Math.floor(Math.random() * ids.length);
                     showid = [ids[idx]];
                     if ($('div.link[data-hidden="1"][data-id$="' + showid + '"].show').length === 0 || ids.length === 0) {
@@ -174,7 +174,7 @@ FluidbookLinks.prototype = {
                     }
                 }
             } else if (mode === 'shownext' || mode === 'shownextcycle') {
-                var ids = $(this).data('showid').split(',');
+                var ids = $(this).data('showid').toString().split(',');
                 var current = $(this).data('current-showid');
                 if (current === undefined) {
                     showid = [ids[0]];
@@ -191,7 +191,7 @@ FluidbookLinks.prototype = {
                 }
                 $(this).data('current-showid', showid[0]);
             } else {
-                showid = $(this).data('showid').split(',');
+                showid = $(this).data('showid').toString().split(',');
             }
 
             if (mode === 'exclusiveshow' || mode === 'shownext' || mode === 'shownextcycle' || mode === 'pickrandom') {