Skip to content

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

core: fix reset attachment failed status

Ammar Ahmedf1c201dca916
diff --git a/packages/core/src/collections/attachments.ts b/packages/core/src/collections/attachments.ts
index 2eef19330..03878525e 100644
--- a/packages/core/src/collections/attachments.ts
+++ b/packages/core/src/collections/attachments.ts
@@ -351,7 +351,7 @@ export class Attachments implements ICollection {
markAsFailed(id: string, reason?: string) {
return this.collection.update([id], {
- failed: reason
+ failed: !reason ? null : reason
});
}