fix: properly filter out invalidKeys when backing up

This commit is contained in:
thecodrr
2020-10-28 13:22:28 +05:00
parent f2efacd7b0
commit 74c2946874

View File

@@ -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));