mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 07:47:16 +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:
@ -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; }`;
|
||||
|
Reference in New Issue
Block a user