Skip to content

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

FIX: Error in test mode with missing `topic`

Robin Ward6e94f28cf065
diff --git a/app/assets/javascripts/select-kit/addon/components/composer-actions.js b/app/assets/javascripts/select-kit/addon/components/composer-actions.js
index 0fb5fdd5a71..540aca54cd5 100644
--- a/app/assets/javascripts/select-kit/addon/components/composer-actions.js
+++ b/app/assets/javascripts/select-kit/addon/components/composer-actions.js
@@ -114,7 +114,7 @@ export default DropdownSelectBoxComponent.extend({
if (
this.action !== CREATE_TOPIC &&
this.action !== CREATE_SHARED_DRAFT &&
- !(this.action === REPLY && this.topic.isPrivateMessage) &&
+ !(this.action === REPLY && this.topic && this.topic.isPrivateMessage) &&
!this.isEditing &&
_topicSnapshot
) {