Skip to content

Build your personal knowledge base with Trilium Notes

content null check in full text search, #3672

zadam1e551581f884
diff --git a/src/services/search/expressions/note_content_fulltext.js b/src/services/search/expressions/note_content_fulltext.js
index 4b1673b6c8..c893b124ba 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;
}