Skip to content

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

fix: properly filter out invalidKeys when backing up

thecodrr74c294687448
diff --git a/packages/core/database/backup.js b/packages/core/database/backup.js
index 8257cef34..141682e5f 100644
--- a/packages/core/database/backup.js
+++ b/packages/core/database/backup.js
@@ -26,7 +26,7 @@ export default class Backup {
throw new Error("Invalid type. It must be one of 'mobile' or 'web'.");
const keys = (await this._db.context.getAllKeys()).filter(
- (key) => !(key in invalidKeys)
+ (key) => !invalidKeys.some((t) => t === key)
);
const db = Object.fromEntries(await this._db.context.readMulti(keys));