mirror of
https://github.com/discourse/discourse.git
synced 2025-06-23 20:13:34 +08:00
DEV: Update registerUnbound()
to native class syntax (#28613)
This commit is contained in:
@ -94,9 +94,11 @@ export function registerUnbound(name, fn) {
|
|||||||
{ id: "discourse.register-unbound" }
|
{ id: "discourse.register-unbound" }
|
||||||
);
|
);
|
||||||
|
|
||||||
_helpers[name] = Helper.extend({
|
_helpers[name] = class extends Helper {
|
||||||
compute: (params, args) => fn(...params, args),
|
compute(params, args) {
|
||||||
});
|
return fn(...params, args);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
registerRawHelper(name, fn);
|
registerRawHelper(name, fn);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user