Created
March 9, 2010 13:41
-
-
Save sifu/326575 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/mustache.js b/mustache.js | |
index 58e6460..1fba949 100644 | |
--- a/mustache.js | |
+++ b/mustache.js | |
@@ -118,6 +118,8 @@ var Mustache = function() { | |
return that.render(content, that.merge(context, | |
that.create_context(row)), partials, true); | |
}).join(""); | |
+ } else if(that.is_object(value)) { // Object, Use it as subcontext! | |
+ return that.render(content, that.merge(context, that.create_context(value)), partials, true); | |
} else if(value) { // boolean section | |
return that.render(content, context, partials, true); | |
} else { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment