REFACTOR: Remove Discourse.__widget_helpers

It's now a variable in the context where the templates are created.
This commit is contained in:
Robin Ward
2020-08-06 14:35:46 -04:00
parent 792bd3faff
commit 7df57b35da
9 changed files with 14 additions and 22 deletions

View File

@ -283,7 +283,7 @@ function compile(template) {
Object.keys(compiler.state.helpersUsed).forEach(h => {
let id = compiler.state.helpersUsed[h];
imports += `var __h${id} = Discourse.__widget_helpers.${h}; `;
imports += `var __h${id} = __widget_helpers.${h}; `;
});
return `function(attrs, state) { ${imports}var _r = [];\n${code}\nreturn _r; }`;