From 1e551581f88455bcf2284e5fabacb48e4a0ee49b Mon Sep 17 00:00:00 2001 From: zadam Date: Mon, 6 Mar 2023 23:23:32 +0100 Subject: [PATCH] content null check in full text search, #3672 --- src/services/search/expressions/note_content_fulltext.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/services/search/expressions/note_content_fulltext.js b/src/services/search/expressions/note_content_fulltext.js index 4b1673b6c..c893b124b 100644 --- a/src/services/search/expressions/note_content_fulltext.js +++ b/src/services/search/expressions/note_content_fulltext.js @@ -69,6 +69,10 @@ class NoteContentFulltextExp extends Expression { } } + if (!content || typeof content !== 'string') { + return; + } + content = this.preprocessContent(content, type, mime); if (this.tokens.length === 1) { @@ -98,6 +102,7 @@ class NoteContentFulltextExp extends Expression { resultNoteSet.add(becca.notes[noteId]); } } + return content; }