mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-21 16:26:43 +00:00
Fix for NOT IN / IN Operators (#7061)
This commit is contained in:
parent
76db64c073
commit
60133941ae
@ -21,13 +21,13 @@ export const evaluateFilter = (stateObj: HassEntity, filter: any): boolean => {
|
||||
case "!=":
|
||||
return state !== value;
|
||||
case "in":
|
||||
if (Array.isArray(state) || typeof state === "string") {
|
||||
return state.includes(value);
|
||||
if (Array.isArray(value) || typeof value === "string") {
|
||||
return value.includes(state);
|
||||
}
|
||||
return false;
|
||||
case "not in":
|
||||
if (Array.isArray(state) || typeof state === "string") {
|
||||
return !state.includes(value);
|
||||
if (Array.isArray(value) || typeof value === "string") {
|
||||
return !value.includes(state);
|
||||
}
|
||||
return false;
|
||||
case "regex": {
|
||||
|
Loading…
x
Reference in New Issue
Block a user