fix: cachedcollection returns empty array on db reinit

This commit is contained in:
thecodrr
2022-08-06 10:30:25 +05:00
parent f41edb0a4d
commit 62b715645f

View File

@@ -66,7 +66,7 @@ export default class CachedCollection extends IndexedCollection {
}
getItems(map = undefined) {
if (this.items) return this.items;
if (this.items && this.items.length === this.map.size) return this.items;
this.items = [];
this.map.forEach((value) => {