commit: 96715d9af5a95d75b244efc67c6870325c2b322d
parent: f24daa399ba78fee689241cd27911f6769da7bb7
Author: Isabelle Knott <isabelle@blackle-mori.com>
Date: Wed, 12 Apr 2017 21:17:34 -0400
Clear spoiler when replying to toot that doesn't also have a spoiler (#1662)
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git 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: