Przeglądaj źródła

Fix rendering partials w/o data

Thanks drobbins (see https://github.com/janl/mustache.js/pull/113)
tags/0.4.0
Michael Jackson 14 lat temu
rodzic
commit
3bbe1ab9d8
1 zmienionych plików z 1 dodań i 1 usunięć
  1. +1
    -1
      mustache.js

+ 1
- 1
mustache.js Wyświetl plik

@@ -139,7 +139,7 @@ var Mustache = function () {
if (!partials || partials[name] === undefined) {
throw({message: "unknown_partial '" + name + "'"});
}
if (typeof context[name] != "object") {
if (!context || typeof context[name] != "object") {
return this.render(partials[name], context, partials, true);
}
return this.render(partials[name], context[name], partials, true);


Ładowanie…
Anuluj
Zapisz