瀏覽代碼

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 16 年之前
父節點
當前提交
27ebed7bca
共有 1 個文件被更改,包括 3 次插入5 次删除
  1. +3
    -5
      mustache.js

+ 3
- 5
mustache.js 查看文件

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

/*


Loading…
取消
儲存