Skip to content

Commit

Permalink
Simplify condition and fall back to status id
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Plastikmensch committed Oct 23, 2023
1 parent 2bd00e3 commit eb727ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/javascript/flavours/glitch/reducers/compose.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 })),
Expand Down

0 comments on commit eb727ff

Please sign in to comment.