Etemplate: Consider null as false when parsing boolean values into template attributes

This commit is contained in:
nathangray 2020-09-14 09:37:37 -06:00
parent 0ed9b7dc09
commit 47a1437e1b
2 changed files with 2 additions and 2 deletions

View File

@ -278,7 +278,7 @@ var et2_arrayMgr = /** @class */ (function () {
var parts = _expression.split('='); var parts = _expression.split('=');
// Expand the first value // Expand the first value
var val = this.expandName(parts[0]); 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 a second expression existed, test that one
if (typeof parts[1] != "undefined") { if (typeof parts[1] != "undefined") {
// Expand the second value // Expand the second value

View File

@ -301,7 +301,7 @@ export class et2_arrayMgr
// Expand the first value // Expand the first value
let val = this.expandName(parts[0]); 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 a second expression existed, test that one
if (typeof parts[1] != "undefined") { if (typeof parts[1] != "undefined") {