Просмотр исходного кода

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 лет назад
Родитель
Сommit
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);
},

/*


Загрузка…
Отмена
Сохранить