DEV: Fix Ember inspector error on anonymous user (#24042)
This commit is contained in:
parent
552cf56afe
commit
0934cc6ece
|
@ -34,7 +34,7 @@ export default class MyPostsSectionLink extends BaseSectionLink {
|
|||
}
|
||||
|
||||
get showCount() {
|
||||
return this.currentUser.sidebarShowCountOfNewItems;
|
||||
return this.currentUser?.sidebarShowCountOfNewItems;
|
||||
}
|
||||
|
||||
get name() {
|
||||
|
|
|
@ -28,7 +28,7 @@ export default class ReviewSectionLink extends BaseSectionLink {
|
|||
get badgeText() {
|
||||
// force a tracker for reviewable_count by using .get to ensure badgeText
|
||||
// rerenders when reviewable_count changes
|
||||
if (this.currentUser.get("reviewable_count") > 0) {
|
||||
if (this.currentUser?.get("reviewable_count") > 0) {
|
||||
return I18n.t("sidebar.sections.community.links.review.pending_count", {
|
||||
count: this.currentUser.reviewable_count,
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue