Skip to content

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

core: check for deleted attachments in pending attachments

Ammar Ahmed9e0286052f6d
diff --git a/packages/core/src/collections/attachments.ts b/packages/core/src/collections/attachments.ts
index 51cd29ca9..e2ade93c8 100644
--- a/packages/core/src/collections/attachments.ts
+++ b/packages/core/src/collections/attachments.ts
@@ -389,7 +389,7 @@ export class Attachments implements ICollection {
get pending() {
return this.collection.createFilter<Attachment>(
- (qb) => qb.where(isFalse("dateUploaded")),
+ (qb) => qb.where(isFalse("dateUploaded")).where(isFalse("deleted")),
this.db.options?.batchSize
);
}