mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
REFACTOR: Remove Discourse.__widget_helpers
It's now a variable in the context where the templates are created.
This commit is contained in:
parent
792bd3faff
commit
7df57b35da
9 changed files with 14 additions and 22 deletions
|
@ -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; }`;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue