small refactorings

This commit is contained in:
zadam
2020-08-30 23:19:55 +02:00
parent b793f8cb88
commit 5fd58def11
2 changed files with 4 additions and 7 deletions

View File

@@ -87,14 +87,9 @@ class NoteCacheFlatTextExp extends Expression {
if (note.type.includes(token) || note.mime.includes(token)) {
foundAttrTokens.push(token);
}
}
for (const attribute of note.ownedAttributes) {
const lcName = attribute.name.toLowerCase();
const lcValue = attribute.value.toLowerCase();
for (const token of this.tokens) {
if (lcName.includes(token) || lcValue.includes(token)) {
for (const attribute of note.ownedAttributes) {
if (attribute.name.includes(token) || attribute.value.includes(token)) {
foundAttrTokens.push(token);
}
}