From 948f9b357e49a437c0401990124da6ab15d4e6ba Mon Sep 17 00:00:00 2001 From: Sam Saffron Date: Thu, 16 Apr 2015 15:22:21 +1000 Subject: [PATCH] protect against failure --- app/assets/javascripts/discourse/controllers/composer.js.es6 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/controllers/composer.js.es6 b/app/assets/javascripts/discourse/controllers/composer.js.es6 index 7a97eda7a..5afe148ff 100644 --- a/app/assets/javascripts/discourse/controllers/composer.js.es6 +++ b/app/assets/javascripts/discourse/controllers/composer.js.es6 @@ -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();