[js] Fix database cleanup function

This commit is contained in:
Chris Bianca 2017-04-26 17:52:16 +01:00
parent 6d4b5bc406
commit 7f7d5e8ec7
1 changed files with 1 additions and 1 deletions

View File

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