Skip to content

Commit 4466a47

Browse files
committed
whoopsiedupecode
1 parent 1f0ca2f commit 4466a47

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

mustache.js

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,12 @@ var Mustache = function() {
1818
context: {},
1919

2020
render: function(template, context, partials, in_recursion) {
21-
// reset buffer
22-
// TODO: make this non-lazy
23-
if(!in_recursion)
24-
this.buffer = [];
21+
// reset buffer & set context
22+
if(!in_recursion) {
23+
this.context = context;
24+
this.buffer = []; // TODO: make this non-lazy
25+
}
26+
2527
// fail fast
2628
if(!this.includes("", template)) {
2729
if(in_recursion) {
@@ -32,11 +34,6 @@ var Mustache = function() {
3234
}
3335
}
3436

35-
if(!in_recursion) {
36-
this.context = context;
37-
this.buffer = [];
38-
}
39-
4037
template = this.render_pragmas(template);
4138
var html = this.render_section(template, context, partials);
4239
if(in_recursion) {

0 commit comments

Comments
 (0)