Skip to content
This repository has been archived by the owner on Sep 28, 2018. It is now read-only.

Commit

Permalink
[fix] type resolution.
Browse files Browse the repository at this point in the history
  • Loading branch information
yssk22 committed Apr 4, 2010
1 parent 6d7f725 commit 9568108
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions vendor/mustache/mustache.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,18 +101,14 @@ var Mustache = function() {
// for each {{#foo}}{{/foo}} section do...
return template.replace(regex, function(match, name, content) {
var value = that.find(name, context);
log("name:" + name);
log(value);
if(that.is_array(value)) { // Enumerable, Let's loop!
log("found array");
if(that.is_array(value)) { // Enumerable, Let's loop!
return that.map(value, function(row) {
return that.render(content, that.merge(context,
that.create_context(row)), partials, true);
}).join("");
} else if(value) { // boolean section
return that.render(content, context, partials, true);
} else {
log("not matched.");
return "";
}
});
Expand Down

0 comments on commit 9568108

Please sign in to comment.