Explorar el Código

Fix rendering partials w/o data

Thanks drobbins (see https://github.com/janl/mustache.js/pull/113)
tags/0.4.0
Michael Jackson hace 14 años
padre
commit
3bbe1ab9d8
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. +1
    -1
      mustache.js

+ 1
- 1
mustache.js Ver fichero

@@ -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);


Cargando…
Cancelar
Guardar