mirror of
https://github.com/zadam/trilium.git
synced 2025-10-31 18:36:30 +01:00
content null check in full text search, #3672
This commit is contained in:
@@ -69,6 +69,10 @@ class NoteContentFulltextExp extends Expression {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!content || typeof content !== 'string') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
content = this.preprocessContent(content, type, mime);
|
content = this.preprocessContent(content, type, mime);
|
||||||
|
|
||||||
if (this.tokens.length === 1) {
|
if (this.tokens.length === 1) {
|
||||||
@@ -98,6 +102,7 @@ class NoteContentFulltextExp extends Expression {
|
|||||||
resultNoteSet.add(becca.notes[noteId]);
|
resultNoteSet.add(becca.notes[noteId]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return content;
|
return content;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user