A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
fix: do not add undefined noteIds to attachments
thecodrrff7c58ec706b
diff --git a/packages/core/collections/attachments.js b/packages/core/collections/attachments.jsindex b61189d46..a20b7205c 100644--- a/packages/core/collections/attachments.js+++ b/packages/core/collections/attachments.js@@ -48,7 +48,7 @@ export default class Attachments extends Collection {(a) => a.metadata.hash === attachment.hash);if (oldAttachment) {- if (oldAttachment.noteIds.includes(noteId)) return;+ if (!noteId || oldAttachment.noteIds.includes(noteId)) return;oldAttachment.noteIds.push(noteId);oldAttachment.dateDeleted = undefined;