core: fix null is not an object error

This fixes #1231#1230 #1235 #1224
This commit is contained in:
Abdullah Atta
2022-10-26 08:47:55 +05:00
committed by Abdullah Atta
parent 7b458a56b2
commit f4f33fc852

View File

@@ -64,7 +64,8 @@ export default class CachedCollection extends IndexedCollection {
}
exists(id) {
return this.has(id) && !this.getItem(id).deleted;
const item = this.getItem(id);
return item && !item.deleted;
}
has(id) {