diff --git a/app/assets/javascripts/discourse/app/helpers/route-action.js b/app/assets/javascripts/discourse/app/helpers/route-action.js index 05fd62d64f3..b47cf7028af 100644 --- a/app/assets/javascripts/discourse/app/helpers/route-action.js +++ b/app/assets/javascripts/discourse/app/helpers/route-action.js @@ -45,14 +45,13 @@ function routeAction(actionName, router, ...params) { }; } -export default Helper.extend({ - router: computed({ - get() { - return getOwner(this).lookup("router:main"); - }, - }), +export default class RouteAction extends Helper { + @computed + get router() { + return getOwner(this).lookup("router:main"); + } compute([actionName, ...params]) { return routeAction(actionName, get(this, "router"), ...params); - }, -}); + } +} diff --git a/app/assets/javascripts/discourse/app/helpers/topic-status-icons.js b/app/assets/javascripts/discourse/app/helpers/topic-status-icons.js index e6e31484bdb..1b685b7f5d0 100644 --- a/app/assets/javascripts/discourse/app/helpers/topic-status-icons.js +++ b/app/assets/javascripts/discourse/app/helpers/topic-status-icons.js @@ -1,6 +1,6 @@ import ArrayProxy from "@ember/array/proxy"; -export default ArrayProxy.extend({ +class TopicStatusIconArrayProxy extends ArrayProxy { render(topic, renderIcon) { const renderIconIf = (conditionProp, name, key) => { if (!topic.get(conditionProp)) { @@ -17,8 +17,10 @@ export default ArrayProxy.extend({ } this.forEach((args) => renderIconIf(...args)); - }, -}).create({ + } +} + +export default TopicStatusIconArrayProxy.create({ content: [ ["is_warning", "envelope", "warning"], ["pinned", "thumbtack", "pinned"],