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
core: merge remote attachment if local attachment doesn't exist
Abdullah Atta308eb4b55fee
diff --git a/packages/core/src/collections/attachments.js b/packages/core/src/collections/attachments.jsindex 0a5d9a167..f42a3db57 100644--- a/packages/core/src/collections/attachments.js+++ b/packages/core/src/collections/attachments.js@@ -39,7 +39,10 @@ export default class Attachments extends Collection {merge(localAttachment, remoteAttachment) {if (remoteAttachment.deleted) return remoteAttachment;- if (remoteAttachment.dateModified > localAttachment.dateModified)+ if (+ !localAttachment ||+ remoteAttachment.dateModified > localAttachment.dateModified+ )return remoteAttachment;if (localAttachment && localAttachment.noteIds) {