瀏覽代碼

Expand context in renderPartial's call to renderTokens.

Fix for "Partials in nested objects don't work #627"
pull/708/head
E-K-n 6 年之前
父節點
當前提交
e3e6ce1c81
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. +2
    -1
      mustache.js

+ 2
- 1
mustache.js 查看文件

@@ -597,7 +597,8 @@

var value = isFunction(partials) ? partials(token[1]) : partials[token[1]];
if (value != null)
return this.renderTokens(this.parse(value, tags), context, partials, value);
return this.renderTokens(this.parse(value, tags), context.view[token[1]] ?
context.push(context.view[token[1]]) : context, partials, value);
};

Writer.prototype.unescapedValue = function unescapedValue (token, context) {


Loading…
取消
儲存