Skip to content

A platform for community discussion. Free, open, simple.

REFACTOR: variable '_postSnapshot' always evaluates to true (#9671)

Joffrey JAFFEUX930989d462a2
diff --git a/app/assets/javascripts/select-kit/components/composer-actions.js b/app/assets/javascripts/select-kit/components/composer-actions.js
index 6b82d66f97b..7afd4d616e2 100644
--- a/app/assets/javascripts/select-kit/components/composer-actions.js
+++ b/app/assets/javascripts/select-kit/components/composer-actions.js
@@ -133,8 +133,7 @@ export default DropdownSelectBoxComponent.extend({
if (
this.canWhisper &&
(!_postSnapshot ||
- (_postSnapshot &&
- _postSnapshot.post_type !== this.site.post_types.whisper))
+ _postSnapshot.post_type !== this.site.post_types.whisper)
) {
items.push({
name: I18n.t("composer.composer_actions.toggle_whisper.label"),