From: Vincent Vanwaelscappel Date: Tue, 4 May 2021 12:32:22 +0000 (+0200) Subject: wip #4450 @0:10 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=5aa50d5b499f7ef7a8eeee3275643009f02b6ced;p=fluidbook-html5.git wip #4450 @0:10 --- diff --git a/js/libs/fluidbook/fluidbook.links.js b/js/libs/fluidbook/fluidbook.links.js index 1c9f5d46..ec21e7d7 100644 --- a/js/libs/fluidbook/fluidbook.links.js +++ b/js/libs/fluidbook/fluidbook.links.js @@ -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') {