mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 23:19:40 +01:00
core: fix null is not an object error
This fixes #1231#1230 #1235 #1224
This commit is contained in:
committed by
Abdullah Atta
parent
7b458a56b2
commit
f4f33fc852
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user