From 68e1307371726da4066afcddc9140232ae93760d Mon Sep 17 00:00:00 2001 From: Isabelle Knott Date: Wed, 12 Apr 2017 21:17:34 -0400 Subject: [PATCH] Clear spoiler when replying to toot that doesn't also have a spoiler (#1662) --- app/assets/javascripts/components/reducers/compose.jsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/assets/javascripts/components/reducers/compose.jsx b/app/assets/javascripts/components/reducers/compose.jsx index 00cc758a56..86974239be 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: