Explorar el Código

The documentation for Mustache does not say that partials should introduce a sub-context. Remove this from Mustache.js

tags/0.5.0-vsc
Sahab Yazdani hace 16 años
padre
commit
27ebed7bca
Se han modificado 1 ficheros con 3 adiciones y 5 borrados
  1. +3
    -5
      mustache.js

+ 3
- 5
mustache.js Ver fichero

@@ -10,7 +10,7 @@ var Mustache = function() {
Renderer.prototype = {
otag: "{{",
ctag: "}}",
pragmas: {},
pragmas: {},thi
buffer: [],
pragmas_implemented: {
"IMPLICIT-ITERATOR": true
@@ -87,10 +87,8 @@ var Mustache = function() {
if(!partials || !partials[name]) {
throw({message: "unknown_partial '" + name + "'"});
}
if(typeof(context[name]) != "object") {
return partials[name];
}
return this.render(partials[name], context[name], partials, true);

return this.render(partials[name], context, partials, true);
},

/*


Cargando…
Cancelar
Guardar