From dee8d40bb3235a908bba514a97a62d3a91a6e131 Mon Sep 17 00:00:00 2001 From: Luca <102960244+Luca-Timo@users.noreply.github.com> Date: Tue, 23 Jun 2026 23:36:56 +0200 Subject: [PATCH] fix(workflows): matchFilter strict equality + accurate comment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- backend/src/services/workflows/engine.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/services/workflows/engine.js b/backend/src/services/workflows/engine.js index 5f64939b..7d7cb4c5 100644 --- a/backend/src/services/workflows/engine.js +++ b/backend/src/services/workflows/engine.js @@ -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);