about summary refs log tree commit diff
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-12-15 17:47:43 +0100
committerGitHub <noreply@github.com>2022-12-15 17:47:43 +0100
commitebf1d74e409ece10864a8615691cd80c434c9055 (patch)
tree54940bf7844caeebb06261ba43b8ac3c5e892c42
parent8556a649d58a7291db6942a2594533f9b8c06165 (diff)
Fix being stuck in edit mode when deleting the edited status (#22126)
-rw-r--r--app/javascript/mastodon/reducers/compose.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/javascript/mastodon/reducers/compose.js b/app/javascript/mastodon/reducers/compose.js
index 9496b56f8..60b0cfb57 100644
--- a/app/javascript/mastodon/reducers/compose.js
+++ b/app/javascript/mastodon/reducers/compose.js
@@ -431,6 +431,8 @@ export default function compose(state = initialState, action) {
   case TIMELINE_DELETE:
     if (action.id === state.get('in_reply_to')) {
       return state.set('in_reply_to', null);
+    } else if (action.id === state.get('id')) {
+      return state.set('id', null);
     } else {
       return state;
     }