From c479b177a728423ae792d9971fee98f8aab16c5a Mon Sep 17 00:00:00 2001 From: jbrw Date: Fri, 25 Oct 2024 13:30:29 -0400 Subject: [PATCH] DEV: Check for presence of currentRoute.attributes (#870) --- assets/javascripts/discourse/components/ai-gist-disclosure.gjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/javascripts/discourse/components/ai-gist-disclosure.gjs b/assets/javascripts/discourse/components/ai-gist-disclosure.gjs index db371fd3..7534d6c2 100644 --- a/assets/javascripts/discourse/components/ai-gist-disclosure.gjs +++ b/assets/javascripts/discourse/components/ai-gist-disclosure.gjs @@ -7,7 +7,7 @@ export default class AiGistDisclosure extends Component { @service router; get shouldShow() { - return this.router.currentRoute.attributes.list?.topics?.some( + return this.router.currentRoute.attributes?.list?.topics?.some( (topic) => topic.ai_topic_gist ); }