From dfe269439a050d714e7e5868fe0ab25b17447ccc Mon Sep 17 00:00:00 2001 From: Claire Date: Fri, 5 Dec 2025 16:17:48 +0100 Subject: [PATCH] =?UTF-8?q?Fix=20=E2=80=9CDelete=20and=20Redraft=E2=80=9D?= =?UTF-8?q?=20on=20a=20non-quote=20being=20treated=20as=20a=20quote=20post?= =?UTF-8?q?=20in=20some=20cases=20(#37140)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/javascript/mastodon/reducers/compose.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/javascript/mastodon/reducers/compose.js b/app/javascript/mastodon/reducers/compose.js index 784050d942..c7e27abd45 100644 --- a/app/javascript/mastodon/reducers/compose.js +++ b/app/javascript/mastodon/reducers/compose.js @@ -530,7 +530,7 @@ export const composeReducer = (state = initialState, action) => { map.set('sensitive', action.status.get('sensitive')); map.set('language', action.status.get('language')); map.set('id', null); - map.set('quoted_status_id', action.status.getIn(['quote', 'quoted_status'])); + map.set('quoted_status_id', action.status.getIn(['quote', 'quoted_status'], null)); // Mastodon-authored posts can be expected to have at most one automatic approval policy map.set('quote_policy', action.status.getIn(['quote_approval', 'automatic', 0]) || 'nobody'); @@ -567,7 +567,7 @@ export const composeReducer = (state = initialState, action) => { map.set('idempotencyKey', uuid()); map.set('sensitive', action.status.get('sensitive')); map.set('language', action.status.get('language')); - map.set('quoted_status_id', action.status.getIn(['quote', 'quoted_status'])); + map.set('quoted_status_id', action.status.getIn(['quote', 'quoted_status'], null)); // Mastodon-authored posts can be expected to have at most one automatic approval policy map.set('quote_policy', action.status.getIn(['quote_approval', 'automatic', 0]) || 'nobody');