From a7654f795283d4f94f07facb3ea2d3987e7fefe4 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Tue, 12 Jun 2012 19:53:51 +0000 Subject: [PATCH] Avoid 'undefined' showing up in attributes when variable or value is missing --- etemplate/js/et2_core_phpExpressionCompiler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etemplate/js/et2_core_phpExpressionCompiler.js b/etemplate/js/et2_core_phpExpressionCompiler.js index 818ed28c94..fbbdb29820 100644 --- a/etemplate/js/et2_core_phpExpressionCompiler.js +++ b/etemplate/js/et2_core_phpExpressionCompiler.js @@ -329,7 +329,7 @@ "]"; } - return result; + return '(typeof _'+_variable.variable+' != "undefined" && typeof '+result + '!="undefined" ? ' + result + ':"")'; } _throwCompilerErr("Variable $" + _variable.variable + " is not defined.");