From 2d0976f456136007fa312e4b27632c1af1a032f1 Mon Sep 17 00:00:00 2001 From: nathan Date: Thu, 6 Jul 2023 08:29:30 -0600 Subject: [PATCH] Handle parsing number into boolean expression --- api/js/etemplate/et2_core_arrayMgr.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/api/js/etemplate/et2_core_arrayMgr.ts b/api/js/etemplate/et2_core_arrayMgr.ts index 46a9c22236..0736a1e2a8 100644 --- a/api/js/etemplate/et2_core_arrayMgr.ts +++ b/api/js/etemplate/et2_core_arrayMgr.ts @@ -351,11 +351,16 @@ export class et2_arrayMgr parseBoolExpression(_expression : string) { - if (typeof _expression === "undefined" || _expression === null) + if(typeof _expression === "undefined" || _expression === null) { return false; } + if(typeof _expression === "number") + { + return !!_expression; + } + // Check whether "$" occurs in the given identifier, don't parse rows if we're not in a row // This saves booleans in repeating rows from being parsed too early - we'll parse again when repeating if(_expression.indexOf('$') >= 0 && this.perspectiveData.row == null && _expression.match(/\$\{?row\}?/))