From d05245b5f5ff71ead88075b20939c2c481166643 Mon Sep 17 00:00:00 2001 From: kpdecker Date: Fri, 15 Aug 2014 00:37:57 -0500 Subject: [PATCH] Make depthed lookup call non-literal Prevents duplicate calls from being made. --- lib/handlebars/compiler/javascript-compiler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/handlebars/compiler/javascript-compiler.js b/lib/handlebars/compiler/javascript-compiler.js index 00402ba7..9fdef1d8 100644 --- a/lib/handlebars/compiler/javascript-compiler.js +++ b/lib/handlebars/compiler/javascript-compiler.js @@ -369,7 +369,7 @@ JavaScriptCompiler.prototype = { if (!scoped && this.options.compat && !this.lastContext) { // The depthed query is expected to handle the undefined logic for the root level that // is implemented below, so we evaluate that directly in compat mode - this.pushStackLiteral(this.depthedLookup(parts[i++])); + this.push(this.depthedLookup(parts[i++])); } else { this.pushContext(); }