mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 15:09:33 +01:00
fix: cachedcollection returns empty array on db reinit
This commit is contained in:
@@ -66,7 +66,7 @@ export default class CachedCollection extends IndexedCollection {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getItems(map = undefined) {
|
getItems(map = undefined) {
|
||||||
if (this.items) return this.items;
|
if (this.items && this.items.length === this.map.size) return this.items;
|
||||||
|
|
||||||
this.items = [];
|
this.items = [];
|
||||||
this.map.forEach((value) => {
|
this.map.forEach((value) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user