File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -18,10 +18,12 @@ var Mustache = function() {
18
18
context : { } ,
19
19
20
20
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
+
25
27
// fail fast
26
28
if ( ! this . includes ( "" , template ) ) {
27
29
if ( in_recursion ) {
@@ -32,11 +34,6 @@ var Mustache = function() {
32
34
}
33
35
}
34
36
35
- if ( ! in_recursion ) {
36
- this . context = context ;
37
- this . buffer = [ ] ;
38
- }
39
-
40
37
template = this . render_pragmas ( template ) ;
41
38
var html = this . render_section ( template , context , partials ) ;
42
39
if ( in_recursion ) {
You can’t perform that action at this time.
0 commit comments