Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

fix: cannor read property "id" of null

thecodrrebb9f392f5dd
diff --git a/packages/core/api/lookup.js b/packages/core/api/lookup.js
index 8106855e0..df831b6fd 100644
--- a/packages/core/api/lookup.js
+++ b/packages/core/api/lookup.js
@@ -18,7 +18,9 @@ export default class Lookup {
return notes.filter((note) => {
let content = "";
if (!note.locked) {
- content = contents.find((content) => content.id === note.contentId);
+ content = contents.find(
+ (content) => !!content && content.id === note.contentId
+ );
if (!content) return false;
content = getContentFromData(content.type, content.data);
content = content.toHTML();