We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 092c614 commit 619ebdaCopy full SHA for 619ebda
javascripts/discourse/components/sidebar-new-topic-button.gjs
@@ -18,7 +18,7 @@ export default class SidebarNewTopicButton extends Component {
18
@tracked tag;
19
20
get shouldRender() {
21
- return this.currentUser;
+ return this.currentUser && !this.router.currentRouteName.includes("admin");
22
}
23
24
get canCreateTopic() {
@@ -69,8 +69,8 @@ export default class SidebarNewTopicButton extends Component {
69
70
@action
71
getCategoryandTag() {
72
- this.category = this.router.currentRoute.attributes.category || null;
73
- this.tag = this.router.currentRoute.attributes.tag || null;
+ this.category = this.router.currentRoute.attributes?.category || null;
+ this.tag = this.router.currentRoute.attributes?.tag || null;
74
75
76
<template>
0 commit comments