]> _ Git - fluidbook-html5.git/commitdiff
wip #6188 @0.25
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 15 Sep 2023 12:03:25 +0000 (14:03 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 15 Sep 2023 12:03:25 +0000 (14:03 +0200)
js/libs/fluidbook/fluidbook.search.js

index c516454f2b493f6763dc62306f0e12d714e7832f..68fa1d7afff658288d09335944558c0cf050333b 100644 (file)
@@ -597,7 +597,9 @@ FluidbookSearch.prototype = {
         for (let i in occurences) {
             let o = occurences[i];
             this.highlights.push({occurences: [o], color: 0, word: term, term: term});
-            this.highlights.push({occurences: o.next, color: 0, word: term, term: term});
+            if(o.next) {
+                this.highlights.push({occurences: o.next, color: 0, word: term, term: term});
+            }
         }
     },