DEV: Update `registerUnbound()` to native class syntax (#28613)

This commit is contained in:
David Taylor 2024-08-28 19:06:14 +01:00 committed by GitHub
parent efa08658be
commit 5df3aa66c8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 3 deletions

View File

@ -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);
}