diff --git a/assets/javascripts/discourse/connectors/after-d-editor/ai-helper-context-menu.js b/assets/javascripts/discourse/connectors/after-d-editor/ai-helper-context-menu.js index 90194dc5..b679d832 100644 --- a/assets/javascripts/discourse/connectors/after-d-editor/ai-helper-context-menu.js +++ b/assets/javascripts/discourse/connectors/after-d-editor/ai-helper-context-menu.js @@ -25,7 +25,7 @@ export default class AiHelperContextMenu extends Component { const canShowInPM = helper.siteSettings.ai_helper_allowed_in_pm; - if (outletArgs.composer.privateMessage) { + if (outletArgs?.composer?.privateMessage) { return helperEnabled && canUseAssistant && canShowInPM; }