FIX: prevents exception when opening new topic on mobile

Repro:

- Visit https://meta.discourse.org/categories, refresh the page
- Navigate to Latest
- Click New Topic
- Error occurs
This commit is contained in:
Joffrey JAFFEUX 2018-02-06 14:48:04 +01:00 committed by GitHub
parent e7b732ad95
commit b1593c0184
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,8 +7,8 @@ export default Ember.Mixin.create({
this.controllerFor('composer').open({ this.controllerFor('composer').open({
categoryId: controller.get('category.id'), categoryId: controller.get('category.id'),
action: Composer.CREATE_TOPIC, action: Composer.CREATE_TOPIC,
draftKey: controller.get('model.draft_key'), draftKey: controller.get('model.draft_key') || Composer.CREATE_TOPIC,
draftSequence: controller.get('model.draft_sequence') draftSequence: controller.get('model.draft_sequence') || 0
}); });
}, },