From: Vincent Vanwaelscappel Date: Fri, 15 Sep 2023 12:03:25 +0000 (+0200) Subject: wip #6188 @0.25 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=6e424e32d613ac3ef0dc80bb37f22b69d543f1fe;p=fluidbook-html5.git wip #6188 @0.25 --- diff --git a/js/libs/fluidbook/fluidbook.search.js b/js/libs/fluidbook/fluidbook.search.js index c516454f..68fa1d7a 100644 --- a/js/libs/fluidbook/fluidbook.search.js +++ b/js/libs/fluidbook/fluidbook.search.js @@ -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}); + } } },