From 62e0558c1892bfcc64fc948ea74c0bf5c9ed856a Mon Sep 17 00:00:00 2001 From: Derek Date: Sun, 15 Nov 2026 18:41:49 +1100 Subject: [PATCH] fix(search): list JSON keys in the search filter panel again The search filter panel showed "No filters available" for a native JSON column, because the key-values request threw ReferenceError: return_optionalChain is not defined. The minified app build turned the optional chain in isNumericOperand (common-utils/src/dfe/jsonPath.ts) into a call to a helper it never defined. That was the only such call in the shipped chunks. The guard now checks for a match without optional chaining, which gives the same result for every input. --- packages/common-utils/src/dfe/jsonPath.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/common-utils/src/dfe/jsonPath.ts b/packages/common-utils/src/dfe/jsonPath.ts index 1f2ae8da..8060c029 100644 --- a/packages/common-utils/src/dfe/jsonPath.ts +++ b/packages/common-utils/src/dfe/jsonPath.ts @@ -347,8 +347,9 @@ function isNumericOperand(sql: string, index: number, expr: string): boolean { const before = sql.slice(0, index); const after = sql.slice(index + expr.length); const guard = /dynamicType\(([^()]*)\) in \([^()]*\) and $/.exec(before); + // No `?.`: the minified app build emitted it as an undefined helper call. return ( - guard?.[1] === expr || + (guard !== null && guard[1] === expr) || NUMBER_AFTER.test(after) || BETWEEN_NUMBERS.test(after) || NUMBER_BEFORE.test(before)