diff --git a/app/assets/javascripts/discourse/controllers/composer.js.es6 b/app/assets/javascripts/discourse/controllers/composer.js.es6 index 5aaa5e85e..dea15afa3 100644 --- a/app/assets/javascripts/discourse/controllers/composer.js.es6 +++ b/app/assets/javascripts/discourse/controllers/composer.js.es6 @@ -61,7 +61,8 @@ export default Discourse.Controller.extend({ }, updateDraftStatus: function() { - this.get('model').updateDraftStatus(); + var c = this.get('model'); + if (c) { c.updateDraftStatus(); } }, appendText: function(text) { diff --git a/app/assets/javascripts/discourse/controllers/topic_controller.js b/app/assets/javascripts/discourse/controllers/topic_controller.js index 893e486c9..9189466e7 100644 --- a/app/assets/javascripts/discourse/controllers/topic_controller.js +++ b/app/assets/javascripts/discourse/controllers/topic_controller.js @@ -638,7 +638,4 @@ Discourse.TopicController = Discourse.ObjectController.extend(Discourse.Selected } } - }); - - diff --git a/app/assets/javascripts/discourse/models/composer.js b/app/assets/javascripts/discourse/models/composer.js index bce0fc054..30a5f9ec0 100644 --- a/app/assets/javascripts/discourse/models/composer.js +++ b/app/assets/javascripts/discourse/models/composer.js @@ -292,7 +292,7 @@ Discourse.Composer = Discourse.Model.extend({ opts: action - The action we're performing: edit, reply or createTopic post - The post we're replying to, if present - topic - The topic we're replying to, if present + topic - The topic we're replying to, if present quote - If we're opening a reply from a quote, the quote we're making */ open: function(opts) { diff --git a/app/assets/javascripts/discourse/templates/composer.js.handlebars b/app/assets/javascripts/discourse/templates/composer.js.handlebars index 9aff0cb15..83d35181e 100644 --- a/app/assets/javascripts/discourse/templates/composer.js.handlebars +++ b/app/assets/javascripts/discourse/templates/composer.js.handlebars @@ -104,7 +104,6 @@ {{i18n composer.saved_draft}} - {{/if}} diff --git a/app/assets/javascripts/discourse/templates/topic.js.handlebars b/app/assets/javascripts/discourse/templates/topic.js.handlebars index d70d5781e..169e5c471 100644 --- a/app/assets/javascripts/discourse/templates/topic.js.handlebars +++ b/app/assets/javascripts/discourse/templates/topic.js.handlebars @@ -57,9 +57,11 @@