Skip to content

Commit

Permalink
core: fix null is not an object error
Browse files Browse the repository at this point in the history
This fixes #1231#1230 #1235 #1224
  • Loading branch information
thecodrr committed Oct 26, 2022
1 parent 7b458a5 commit f4f33fc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/core/database/cached-collection.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit f4f33fc

Please sign in to comment.