Skip to content

Commit 1208c19

Browse files
Copilothotlong
andcommitted
refactor: clarify expression extraction logic per code review feedback
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent de66a2c commit 1208c19

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/plugin-list/src/ListView.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,10 @@ export function evaluateConditionalFormatting(
140140
let match = false;
141141

142142
// Determine expression: spec uses 'condition', ObjectUI uses 'expression'
143-
const expression = ('condition' in rule && rule.condition)
144-
|| ('expression' in rule && rule.expression);
143+
const expression =
144+
('condition' in rule ? rule.condition : undefined)
145+
|| ('expression' in rule ? rule.expression : undefined)
146+
|| undefined;
145147

146148
// Expression-based evaluation using safe ExpressionEvaluator
147149
// Supports both template expressions (${data.field > value}) and

0 commit comments

Comments
 (0)