From 27ebed7bca5096dadbc2d887e34c7856a3948041 Mon Sep 17 00:00:00 2001 From: Sahab Yazdani Date: Mon, 17 May 2010 07:21:50 -0700 Subject: [PATCH] The documentation for Mustache does not say that partials should introduce a sub-context. Remove this from Mustache.js --- mustache.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/mustache.js b/mustache.js index 9401f83..3860851 100644 --- a/mustache.js +++ b/mustache.js @@ -10,7 +10,7 @@ var Mustache = function() { Renderer.prototype = { otag: "{{", ctag: "}}", - pragmas: {}, + pragmas: {},thi buffer: [], pragmas_implemented: { "IMPLICIT-ITERATOR": true @@ -87,10 +87,8 @@ var Mustache = function() { if(!partials || !partials[name]) { throw({message: "unknown_partial '" + name + "'"}); } - if(typeof(context[name]) != "object") { - return partials[name]; - } - return this.render(partials[name], context[name], partials, true); + + return this.render(partials[name], context, partials, true); }, /*