From 6e424e32d613ac3ef0dc80bb37f22b69d543f1fe Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Fri, 15 Sep 2023 14:03:25 +0200 Subject: [PATCH] wip #6188 @0.25 --- js/libs/fluidbook/fluidbook.search.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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}); + } } }, -- 2.39.5