]> _ Git - fluidbook-html5.git/commitdiff
wait #4798 @0:10
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 18 Oct 2021 14:43:33 +0000 (16:43 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 18 Oct 2021 14:43:33 +0000 (16:43 +0200)
js/libs/fluidbook/fluidbook.links.js

index cbbbc4a74a395c249009f5079760a16dc14b869a..4b11ac28a80cd0581876d34c55cddc2e927d4482 100644 (file)
@@ -469,7 +469,7 @@ FluidbookLinks.prototype = {
         if (llinks !== '') {
             container.html(llinks);
         }
-        if(page==0){
+        if (page == 0) {
             container.addClass('empty');
         }
         if (this.fluidbook.settings.bookmark) {
@@ -912,6 +912,10 @@ FluidbookLinks.prototype = {
 
     triggerLinkById: function (id) {
         var link = $('.link[data-id="' + id + '"]');
+        if ($(link).length === 0) {
+            console.warn('Link ' + id + ' cant be triggered');
+            return;
+        }
 
         if ($(link).is('[data-animations]')) {
             this.animateContentLink($(link), false);