diff options
author | kpdecker <kpdecker@gmail.com> | 2015-08-03 12:16:02 -0500 |
---|---|---|
committer | kpdecker <kpdecker@gmail.com> | 2015-08-03 12:16:02 -0500 |
commit | 1c08771215af7377fb8f33a26f64b3af0e06c168 (patch) | |
tree | 37bc4ee51c4b6d42f5bc67f3863d27a11e4edfa3 /lib | |
parent | 9f265b97614e5c4763dc3d2d7343fc2472a6cc1a (diff) | |
download | handlebars.js-1c08771215af7377fb8f33a26f64b3af0e06c168.zip handlebars.js-1c08771215af7377fb8f33a26f64b3af0e06c168.tar.gz handlebars.js-1c08771215af7377fb8f33a26f64b3af0e06c168.tar.bz2 |
Fix track id handling in partials
Fixes #914
Diffstat (limited to 'lib')
-rw-r--r-- | lib/handlebars/runtime.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/handlebars/runtime.js b/lib/handlebars/runtime.js index 5f73897..d41b42a 100644 --- a/lib/handlebars/runtime.js +++ b/lib/handlebars/runtime.js @@ -36,6 +36,9 @@ export function template(templateSpec, env) { function invokePartialWrapper(partial, context, options) { if (options.hash) { context = Utils.extend({}, context, options.hash); + if (options.ids) { + options.ids[0] = true; + } } partial = env.VM.resolvePartial.call(this, partial, context, options); @@ -193,6 +196,9 @@ export function resolvePartial(partial, context, options) { export function invokePartial(partial, context, options) { options.partial = true; + if (options.ids) { + options.data.contextPath = options.ids[0] || options.data.contextPath; + } if (partial === undefined) { throw new Exception('The partial ' + options.name + ' could not be found'); |