From eb727ffe062c46f868a62ae730330134ae83c8fc Mon Sep 17 00:00:00 2001 From: Plastikmensch Date: Sun, 1 Oct 2023 17:15:14 +0200 Subject: [PATCH] Simplify condition and fall back to status id It's actually not necessary to check if state id is null, just use `last_status_in_thread` and fall back to status id. Signed-off-by: Plastikmensch --- app/javascript/flavours/glitch/reducers/compose.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/javascript/flavours/glitch/reducers/compose.js b/app/javascript/flavours/glitch/reducers/compose.js index 803d2bfc521eb0..c35e2e11f265e8 100644 --- a/app/javascript/flavours/glitch/reducers/compose.js +++ b/app/javascript/flavours/glitch/reducers/compose.js @@ -203,7 +203,7 @@ function continueThread (state, status) { map.set('spoiler_text', ''); } map.set('is_submitting', false); - map.set('in_reply_to', state.get('id') == null ? status.id : state.get('last_status_in_thread')); + map.set('in_reply_to', state.get('last_status_in_thread') == null ? status.id : state.get('last_status_in_thread')); map.update( 'advanced_options', map => map.merge(new ImmutableMap({ do_not_federate: status.local_only })),