Skip to content

A platform for community discussion. Free, open, simple.

DEV: Attempt to fix flaky sidebar test (#17852)

Alan Guo Xiang Tan55fa94f75901
diff --git a/app/assets/javascripts/discourse/app/components/sidebar/more-section-links.js b/app/assets/javascripts/discourse/app/components/sidebar/more-section-links.js
index d339ad6edfd..3e54ee34d20 100644
--- a/app/assets/javascripts/discourse/app/components/sidebar/more-section-links.js
+++ b/app/assets/javascripts/discourse/app/components/sidebar/more-section-links.js
@@ -72,8 +72,8 @@ export default class SidebarMoreSectionLinks extends GlimmerComponent {
}
@action
- toggleSectionLinks() {
- this.shouldDisplaySectionLinks = !this.shouldDisplaySectionLinks;
+ toggleSectionLinks(element) {
+ this.shouldDisplaySectionLinks = element.target.hasAttribute("open");
}
#removeClickEventListener() {