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.");