about summary refs log tree commit diff
diff options
context:
space:
mode:
authorIsabelle Knott <isabelle@blackle-mori.com>2017-04-12 21:17:34 -0400
committerEugen <eugen@zeonfederated.com>2017-04-13 03:17:34 +0200
commit96715d9af5a95d75b244efc67c6870325c2b322d (patch)
tree74bd7e74de55228b3513464f79a358058dc14d2e
parentf24daa399ba78fee689241cd27911f6769da7bb7 (diff)
Clear spoiler when replying to toot that doesn't also have a spoiler (#1662)
-rw-r--r--app/assets/javascripts/components/reducers/compose.jsx3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/assets/javascripts/components/reducers/compose.jsx b/app/assets/javascripts/components/reducers/compose.jsx
index 00cc758a5..86974239b 100644
--- a/app/assets/javascripts/components/reducers/compose.jsx
+++ b/app/assets/javascripts/components/reducers/compose.jsx
@@ -157,6 +157,9 @@ export default function compose(state = initialState, action) {
       if (action.status.get('spoiler_text').length > 0) {
         map.set('spoiler', true);
         map.set('spoiler_text', action.status.get('spoiler_text'));
+      } else {
+        map.set('spoiler', false);
+        map.set('spoiler_text', '');
       }
     });
   case COMPOSE_REPLY_CANCEL: