From a4ce71f523701024cf6a9c763cc28669b7ab0bfd Mon Sep 17 00:00:00 2001 From: Sahab Yazdani Date: Wed, 27 Apr 2011 12:51:36 -0400 Subject: [PATCH] Do not need 'variable' temporary --- mustache.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mustache.js b/mustache.js index 90ebb87..77d9721 100644 --- a/mustache.js +++ b/mustache.js @@ -318,7 +318,7 @@ var Mustache = (function(undefined) { } } - var s = parserContext.section, variable = s.variable, template = s.template_buffer.join('') + var s = parserContext.section, template = s.template_buffer.join('') program = parse(create_section_context(template)); if (s.inverted) { @@ -327,9 +327,9 @@ var Mustache = (function(undefined) { if (!value || is_array(value) && value.length === 0) { // false or empty list, render it program(context, send_func); } - };})(program, variable)); + };})(program, s.variable)); } else { - parserContext.send_code_func((function(program, variable, partials){ return function(context, send_func) { + parserContext.send_code_func((function(program, variable, template, partials){ return function(context, send_func) { var value = find_in_stack(variable, context); if (is_array(value)) { // Enumerable, Let's loop! for (var i=0, n=value.length; i