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; }