fix problems with updating note in note cache when entities are coming out of order (e.g. sync)

This commit is contained in:
zadam
2020-09-03 21:37:06 +02:00
parent 918e827d91
commit 0bd9b849b2
6 changed files with 43 additions and 49 deletions

View File

@@ -84,9 +84,7 @@ class NoteCacheFlatTextExp extends Expression {
const foundAttrTokens = [];
for (const token of this.tokens) {
// 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))) {
if (note.type.includes(token) || note.mime.includes(token)) {
foundAttrTokens.push(token);
}