ezfw-core 1.0.37 → 1.0.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -338,7 +338,13 @@ export class EzBaseComponent {
338
338
  const stop = effect(() => {
339
339
  const state = ez._controllers[controllerName]?.state;
340
340
  const left = ez.getDeepValue(state, props);
341
- const right = isNaN(Number(rightExpr)) ? rightExpr : Number(rightExpr);
341
+ // Parse boolean, null, undefined literals
342
+ let right = rightExpr;
343
+ if (rightExpr === 'true') right = true;
344
+ else if (rightExpr === 'false') right = false;
345
+ else if (rightExpr === 'null') right = null;
346
+ else if (rightExpr === 'undefined') right = undefined;
347
+ else if (!isNaN(Number(rightExpr))) right = Number(rightExpr);
342
348
  let result = true;
343
349
  switch (operator) {
344
350
  case '>':
@@ -558,7 +558,13 @@ export class EzBaseComponent {
558
558
  const state = ez._controllers[controllerName]?.state;
559
559
  const left = ez.getDeepValue(state, props) as number | string;
560
560
 
561
- const right = isNaN(Number(rightExpr)) ? rightExpr : Number(rightExpr);
561
+ // Parse boolean, null, undefined literals
562
+ let right: string | number | boolean | null | undefined = rightExpr;
563
+ if (rightExpr === 'true') right = true;
564
+ else if (rightExpr === 'false') right = false;
565
+ else if (rightExpr === 'null') right = null;
566
+ else if (rightExpr === 'undefined') right = undefined;
567
+ else if (!isNaN(Number(rightExpr))) right = Number(rightExpr);
562
568
 
563
569
  let result = true;
564
570
  switch (operator) {