mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 02:16:05 +01:00 
			
		
		
		
	fix potential null in mime or type in note cache
This commit is contained in:
		| @@ -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); | ||||
|                 } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user