fix: liveQuery with containedIn not working when object field is an array (#8128)
This commit is contained in:
@@ -103,8 +103,18 @@ function contains(haystack: Array, needle: any): boolean {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if (Array.isArray(needle)) {
|
||||
for (const need of needle) {
|
||||
if (contains(haystack, need)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return haystack.indexOf(needle) > -1;
|
||||
}
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user