1
0
mirror of https://github.com/mastodon/mastodon synced 2024-11-27 22:38:27 +09:00

Clear spoiler when replying to toot that doesn't also have a spoiler (#1662)

This commit is contained in:
Isabelle Knott 2017-04-12 21:17:34 -04:00 committed by Eugen
parent f24daa399b
commit 96715d9af5

View File

@ -157,6 +157,9 @@ export default function compose(state = initialState, action) {
if (action.status.get('spoiler_text').length > 0) { if (action.status.get('spoiler_text').length > 0) {
map.set('spoiler', true); map.set('spoiler', true);
map.set('spoiler_text', action.status.get('spoiler_text')); map.set('spoiler_text', action.status.get('spoiler_text'));
} else {
map.set('spoiler', false);
map.set('spoiler_text', '');
} }
}); });
case COMPOSE_REPLY_CANCEL: case COMPOSE_REPLY_CANCEL: