Skip to content

Commit 25c8461

Browse files
author
Jason Posthuma
committed
Fixed logic returning false positive
1 parent b597244 commit 25c8461

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/LiveQuery/QueryTools.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,11 @@ function matchesKeyConstraints(object, key, constraints) {
253253
}
254254
break;
255255
case '$all':
256+
if (!object[key]) {
257+
return false;
258+
}
256259
for (i = 0; i < compareTo.length; i++) {
257-
if (object[key] && object[key].indexOf(compareTo[i]) < 0) {
260+
if (object[key].indexOf(compareTo[i]) < 0) {
258261
return false;
259262
}
260263
}

0 commit comments

Comments
 (0)