FIX: Restore functionality of `custom-html` for now

This commit is contained in:
Robin Ward 2016-11-15 12:15:13 -05:00
parent bd1b7bd330
commit 852639e27a
1 changed files with 9 additions and 1 deletions

View File

@ -20,7 +20,15 @@ export function setCustomHTML(key, html) {
_customizations[key] = html; _customizations[key] = html;
} }
registerHelper('custom-html', function([id]) { registerHelper('custom-html', function([id, contextString], hash, options, env) {
const html = getCustomHTML(id); const html = getCustomHTML(id);
if (html) { return html; } if (html) { return html; }
if (env) {
const target = (env || contextString);
const container = target.container || target.data.view.container;
if (container.lookup('template:' + id)) {
return env.helpers.partial.helperFunction.apply(this, arguments);
}
}
}); });