fix(workflows): matchFilter strict equality + accurate comment

Concern #2: switch eq/neq to ===/!== (drop the eslint-disable); a filter
{value:0} no longer matches false/''/null. Comment corrected — no implicit
type normalisation; filter authors match the payload type.
This commit is contained in:
Luca
2026-06-23 23:36:56 +02:00
parent 440b2b379f
commit dee8d40bb3
+1 -1
View File
@@ -63,7 +63,7 @@ function matchFilter(filter, payload) {
const { field, op = 'eq', value } = filter;
const actual = payload ? payload[field] : undefined;
// Strict equality: a filter {value: 0} must NOT match false/''/null (loose ==
// conflated them). Numeric payloads vs string config are normalised below.
// conflated them). Authors must therefore match the payload's actual type.
switch (op) {
case 'neq': return actual !== value;
case 'truthy': return Boolean(actual);