From 8c89f5704dbf4ecc31defba20cb17acec6d64c5d Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Thu, 8 Feb 2018 14:18:53 +0100 Subject: [PATCH] =?UTF-8?q?FIX:=20makes=20sure=20we=20display=20whisper=20?= =?UTF-8?q?if=20we=20don=E2=80=99t=20have=20a=20post?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../javascripts/select-kit/components/composer-actions.js.es6 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/select-kit/components/composer-actions.js.es6 b/app/assets/javascripts/select-kit/components/composer-actions.js.es6 index aef58aed610..5c0fc2277f6 100644 --- a/app/assets/javascripts/select-kit/components/composer-actions.js.es6 +++ b/app/assets/javascripts/select-kit/components/composer-actions.js.es6 @@ -98,7 +98,7 @@ export default DropdownSelectBoxComponent.extend({ } // if answered post is a whisper, we can only answer with a whisper so no need for toggle - if (canWhisper && (_postSnapshot && _postSnapshot.post_type !== this.site.post_types.whisper)) { + if (canWhisper && (!_postSnapshot || _postSnapshot && _postSnapshot.post_type !== this.site.post_types.whisper)) { items.push({ name: I18n.t("composer.composer_actions.toggle_whisper.label"), description: I18n.t("composer.composer_actions.toggle_whisper.desc"),