diff options
author | ThibG <thib@sitedethib.com> | 2019-06-29 18:32:36 +0200 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2019-06-29 18:32:36 +0200 |
commit | ccc7fe3e1d04c7cabad916e4e57c7739743d5c91 (patch) | |
tree | 3aea15cf75ff0792dd3a01b8d32bfae8cc3a8996 /app/javascript/mastodon/reducers/compose.js | |
parent | 84ff3938426da348e31651dfad376d83a9784343 (diff) |
When sending a toot, ensure a CW is only set if the CW field is visible (#11206)
In some occasions, such as the browser or a browser extension auto-filling the existing but disabled/hidden CW field, a CW can be set without the user knowing.
Diffstat (limited to 'app/javascript/mastodon/reducers/compose.js')
-rw-r--r-- | app/javascript/mastodon/reducers/compose.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/javascript/mastodon/reducers/compose.js b/app/javascript/mastodon/reducers/compose.js index 29c691144..8cdd29bfe 100644 --- a/app/javascript/mastodon/reducers/compose.js +++ b/app/javascript/mastodon/reducers/compose.js @@ -224,6 +224,7 @@ export default function compose(state = initialState, action) { } }); case COMPOSE_SPOILER_TEXT_CHANGE: + if (!state.get('spoiler')) return state; return state .set('spoiler_text', action.text) .set('idempotencyKey', uuid()); |