From 17d804b18929dc56d97e46f2f9588ff1640f1f43 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 7 Jul 2010 22:03:58 -0400 Subject: [PATCH] fix variable reference error --- mustache.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mustache.js b/mustache.js index 8a98c7a..8737f8b 100644 --- a/mustache.js +++ b/mustache.js @@ -414,13 +414,13 @@ var Mustache = function() { .replace(/>/g,'>'); } - var result = this.find(key, contextStack); + var result = this.find(key, contextStack[contextStack.length-1]); if (result!==undefined) { this.send_func(escapeHTML(result)); } }, render_unescaped_variable: function(key, contextStack) { - var result = this.find(key, contextStack); + var result = this.find(key, contextStack[contextStack.length-1]); if (result!==undefined) { this.send_func(result); }