Explorar el Código

Hit a snafu when in the browser.

with-js-extras
Paul J. Davis hace 16 años
padre
commit
10adbaf4fe
Se han modificado 1 ficheros con 5 adiciones y 2 borrados
  1. +5
    -2
      mustache.js

+ 5
- 2
mustache.js Ver fichero

@@ -164,8 +164,11 @@ var Mustache = function() {
while(parts.length) {
p = parts.shift();
if(ctx[p] === undefined) {
src = context.toSource();
src = src.replace(/^\(|\)$/g, "");
if(typeof(context.toSource) == "function") {
src = context.toSource().replace(/^\(|\)$/g, "");
} else {
src = context.toString();
}
throw({message: "'" + name + "' not found in context: " + src});
}
ctx = ctx[p];


Cargando…
Cancelar
Guardar