From 293497c23de922b058c8f3884a928c09b9ffcebc Mon Sep 17 00:00:00 2001 From: Christoph Wiechert Date: Mon, 8 May 2017 15:08:15 +0200 Subject: [PATCH] Fix: partial one-time bucket download --- lib/db.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/db.js b/lib/db.js index b7e3104..2f9453e 100644 --- a/lib/db.js +++ b/lib/db.js @@ -102,7 +102,7 @@ module.exports = class DB { if(!this.initialized) throw new Error('DB not initialized'); debug(`Remove ${sid}++${key}`); await this.store.del(sid + '++' + key); - const i = this.get(sid).find(item => item.key === key); + const i = this.db[sid].findIndex(item => item.key === key); this.get(sid).splice(i, 1); if(this.get(sid).length === 0) { delete this.db[sid];