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