From 47a1437e1b67a6dc0cecf5e83d98056ff224bbeb Mon Sep 17 00:00:00 2001 From: nathangray Date: Mon, 14 Sep 2020 09:37:37 -0600 Subject: [PATCH] Etemplate: Consider null as false when parsing boolean values into template attributes --- api/js/etemplate/et2_core_arrayMgr.js | 2 +- api/js/etemplate/et2_core_arrayMgr.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/js/etemplate/et2_core_arrayMgr.js b/api/js/etemplate/et2_core_arrayMgr.js index dedbc886cc..8661fa316d 100644 --- a/api/js/etemplate/et2_core_arrayMgr.js +++ b/api/js/etemplate/et2_core_arrayMgr.js @@ -278,7 +278,7 @@ var et2_arrayMgr = /** @class */ (function () { var parts = _expression.split('='); // Expand the first value var val = this.expandName(parts[0]); - val = typeof val == "undefined" ? '' : '' + val; + val = (typeof val == "undefined" || val === null) ? '' : '' + val; // If a second expression existed, test that one if (typeof parts[1] != "undefined") { // Expand the second value diff --git a/api/js/etemplate/et2_core_arrayMgr.ts b/api/js/etemplate/et2_core_arrayMgr.ts index d494e2ed03..38a191db97 100644 --- a/api/js/etemplate/et2_core_arrayMgr.ts +++ b/api/js/etemplate/et2_core_arrayMgr.ts @@ -301,7 +301,7 @@ export class et2_arrayMgr // Expand the first value let val = this.expandName(parts[0]); - val = typeof val == "undefined" ? '' : '' + val; + val = (typeof val == "undefined" || val === null) ? '' : '' + val; // If a second expression existed, test that one if (typeof parts[1] != "undefined") {