fix: items not deleting from collection

This commit is contained in:
thecodrr
2020-02-20 13:00:38 +05:00
parent 389e4612db
commit 6bc4e2327b

View File

@@ -50,10 +50,9 @@ export default class CachedCollection {
async removeItem(id) {
if (this.transactionOpen) return;
if (this.map.delete(id)) {
await this.indexer.remove(id);
await this.indexer.deindex(id);
}
await this.indexer.deindex(id);
await this.indexer.remove(id);
this.map.delete(id);
}
exists(id) {