A platform for community discussion. Free, open, simple.
DEV: Set owner of sidebar section objects (#17827)
Jarek Radosz8b8cbe79051d
diff --git a/app/assets/javascripts/discourse/app/components/sidebar/sections.js b/app/assets/javascripts/discourse/app/components/sidebar/sections.jsindex c260f738651..748d408d8f4 100644--- a/app/assets/javascripts/discourse/app/components/sidebar/sections.js+++ b/app/assets/javascripts/discourse/app/components/sidebar/sections.js@@ -1,5 +1,6 @@import GlimmerComponent from "discourse/components/glimmer";import { customSections as sidebarCustomSections } from "discourse/lib/sidebar/custom-sections";+import { getOwner, setOwner } from "@ember/application";export default class SidebarSections extends GlimmerComponent {customSections;@@ -11,7 +12,9 @@ export default class SidebarSections extends GlimmerComponent {get _customSections() {return sidebarCustomSections.map((customSection) => {- return new customSection({ sidebar: this });+ const section = new customSection({ sidebar: this });+ setOwner(section, getOwner(this));+ return section;});}}