mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
fix potential null in mime or type in note cache
This commit is contained in:
parent
42ecc0e15b
commit
918e827d91
@ -84,7 +84,9 @@ class NoteCacheFlatTextExp extends Expression {
|
||||
const foundAttrTokens = [];
|
||||
|
||||
for (const token of this.tokens) {
|
||||
if (note.type.includes(token) || note.mime.includes(token)) {
|
||||
// not clear why, but sometimes note.type or note.mime is undefined
|
||||
if ((note.type && note.type.includes(token))
|
||||
|| (note.mime && note.mime.includes(token))) {
|
||||
foundAttrTokens.push(token);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user