Skip to content

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

core: fix attachment deletion

Abdullah Atta52800b39e401
diff --git a/packages/core/src/collections/attachments.ts b/packages/core/src/collections/attachments.ts
index 0dd11a296..8f5fcce2e 100644
--- a/packages/core/src/collections/attachments.ts
+++ b/packages/core/src/collections/attachments.ts
@@ -236,7 +236,7 @@ export class Attachments implements ICollection {
return (
(await this.db.relations
.to({ ids: linkedNotes.map((n) => n.toId), type: "note" }, "vault")
- .count()) > 0
+ .count()) <= 0
);
}