FIX: makes sure we display whisper if we don’t have a post

This commit is contained in:
Joffrey JAFFEUX 2018-02-08 14:18:53 +01:00 committed by GitHub
parent 0ecdf90023
commit 8c89f5704d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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"),