From 3c41cb6b7d893d6330c624bd6707c9e494a1e41d Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Wed, 8 Mar 2017 19:52:35 +0800 Subject: [PATCH] FIX: Reply to topic keyboard shortcut raises an error on non-topic routes. --- app/assets/javascripts/discourse/controllers/topic.js.es6 | 1 + 1 file changed, 1 insertion(+) diff --git a/app/assets/javascripts/discourse/controllers/topic.js.es6 b/app/assets/javascripts/discourse/controllers/topic.js.es6 index ce13719f3be..17996c23ef6 100644 --- a/app/assets/javascripts/discourse/controllers/topic.js.es6 +++ b/app/assets/javascripts/discourse/controllers/topic.js.es6 @@ -313,6 +313,7 @@ export default Ember.Controller.extend(SelectedPostsCount, BufferedContent, { const quoteState = this.get('quoteState'); const postStream = this.get('model.postStream'); + if (!postStream) return; const quotedPost = postStream.findLoadedPost(quoteState.postId); const quotedText = Quote.build(quotedPost, quoteState.buffer);