From 7f7d5e8ec7a9b5194bdf7b55137bba9e1688837a Mon Sep 17 00:00:00 2001 From: Chris Bianca Date: Wed, 26 Apr 2017 17:52:16 +0100 Subject: [PATCH] [js] Fix database cleanup function --- lib/modules/database/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/modules/database/index.js b/lib/modules/database/index.js index 17005c75..5fc61033 100644 --- a/lib/modules/database/index.js +++ b/lib/modules/database/index.js @@ -105,7 +105,7 @@ export default class Database extends Base { const promises = []; Object.keys(this.references).forEach((refId) => { const ref = this.references[refId]; - promises.push(this.off(refId, ref.listeners, 0)); + promises.push(this.off(Number(refId), Object.values(ref.listeners), 0)); }); return Promise.all(promises); }