Selaa lähdekoodia

Reset the buffer only for new renderings, not e.g. partials

tags/0.3.0
Jason Smith Jan Lehnardt <jan@apache.org> 16 vuotta sitten
vanhempi
commit
c5a114bf88
1 muutettua tiedostoa jossa 2 lisäystä ja 1 poistoa
  1. +2
    -1
      mustache.js

+ 2
- 1
mustache.js Näytä tiedosto

@@ -19,7 +19,8 @@ var Mustache = function() {
render: function(template, context, partials, in_recursion) {
// reset buffer
// TODO: make this non-lazy
this.buffer = [];
if(!in_recursion)
this.buffer = [];
// fail fast
if(!this.includes("", template)) {
if(in_recursion) {


Loading…
Peruuta
Tallenna