Skip to content

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

fix: hash is not defined

thecodrr238879190d72
diff --git a/packages/core/collections/attachments.js b/packages/core/collections/attachments.js
index 64c430a61..a864c042d 100644
--- a/packages/core/collections/attachments.js
+++ b/packages/core/collections/attachments.js
@@ -167,7 +167,9 @@ export default class Attachments extends Collection {
const note = this._db.notes.note(noteId);
if (!note) continue;
const contentId = note.data.contentId;
- await this._db.content.removeAttachments(contentId, [hash]);
+ await this._db.content.removeAttachments(contentId, [
+ attachment.metadata.hash,
+ ]);
}
}