summaryrefslogtreecommitdiffstats
path: root/lib/handlebars/runtime.js
diff options
context:
space:
mode:
authorYehuda Katz <wycats@gmail.com>2016-09-10 07:10:36 -0700
committerGitHub <noreply@github.com>2016-09-10 07:10:36 -0700
commit7535e48a7969229f44489124a8ef07bd17363f06 (patch)
tree0019d7c0267de63510d2a7b4fe19e349d1b45402 /lib/handlebars/runtime.js
parent11b99b361d5c76e9f842881b36af9b726494fe85 (diff)
parent21696005cd9e5a3ea2150431df44fd13da2c405c (diff)
downloadhandlebars.js-master.zip
handlebars.js-master.tar.gz
handlebars.js-master.tar.bz2
Merge pull request #1243 from lawnsea/nested-partial-blocksHEADorigin/masterorigin/HEADmaster
Walk up data frames for nested @partial-block
Diffstat (limited to 'lib/handlebars/runtime.js')
-rw-r--r--lib/handlebars/runtime.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/handlebars/runtime.js b/lib/handlebars/runtime.js
index 55eb1c1..7426f1f 100644
--- a/lib/handlebars/runtime.js
+++ b/lib/handlebars/runtime.js
@@ -197,7 +197,12 @@ export function wrapProgram(container, i, fn, data, declaredBlockParams, blockPa
export function resolvePartial(partial, context, options) {
if (!partial) {
if (options.name === '@partial-block') {
- partial = options.data['partial-block'];
+ let data = options.data;
+ while (data['partial-block'] === noop) {
+ data = data._parent;
+ }
+ partial = data['partial-block'];
+ data['partial-block'] = noop;
} else {
partial = options.partials[options.name];
}