protect against failure

This commit is contained in:
Sam Saffron 2015-04-16 15:22:21 +10:00
parent c2dd9564b3
commit 948f9b357e
1 changed files with 1 additions and 1 deletions

View File

@ -220,7 +220,7 @@ export default DiscourseController.extend({
editReason: this.get("editReason")
}).then(function(result) {
if (result.responseJson.action === "enqueued") {
if (result.responseJson && result.responseJson.action === "enqueued") {
self.send('postWasEnqueued');
self.destroyDraft();
self.close();