Fix operator in while numaric array

This commit is contained in:
Quentin POLLET 2024-02-04 16:11:12 +00:00
parent cae2f8e9e3
commit 013ae59043

View File

@ -69,11 +69,17 @@ export const evaluateStateFilter = (
return state !== value; return state !== value;
case "in": case "in":
if (Array.isArray(value) || typeof value === "string") { if (Array.isArray(value) || typeof value === "string") {
if (Array.isArray(value)) {
value = value.map((val) => `${val}`);
}
return value.includes(state); return value.includes(state);
} }
return false; return false;
case "not in": case "not in":
if (Array.isArray(value) || typeof value === "string") { if (Array.isArray(value) || typeof value === "string") {
if (Array.isArray(value)) {
value = value.map((val) => `${val}`);
}
return !value.includes(state); return !value.includes(state);
} }
return false; return false;