瀏覽代碼

Hit a snafu when in the browser.

with-js-extras
Paul J. Davis 16 年之前
父節點
當前提交
10adbaf4fe
共有 1 個檔案被更改,包括 5 行新增2 行删除
  1. +5
    -2
      mustache.js

+ 5
- 2
mustache.js 查看文件

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


Loading…
取消
儲存