Skip to content

Commit 2cc8222

Browse files
actual fix
1 parent bcc0fb3 commit 2cc8222

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/LiveQuery/QueryTools.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ function contains(haystack: Array, needle: any): boolean {
9999
if (typeof ptr === 'string' && ptr === needle.objectId) {
100100
return true;
101101
}
102-
if (ptr.className === needle.className && ptr.objectId === needle.objectId) {
102+
if (ptr && ptr.className === needle.className && ptr.objectId === needle.objectId) {
103103
return true;
104104
}
105105
}
@@ -212,6 +212,7 @@ function matchesKeyConstraints(object, key, constraints) {
212212
return equalObjectsGeneric(object[key], constraints, function (obj, ptr) {
213213
return (
214214
typeof obj !== 'undefined' &&
215+
obj !== null &&
215216
ptr.className === obj.className &&
216217
ptr.objectId === obj.objectId
217218
);

0 commit comments

Comments
 (0)