Skip to content

Commit

Permalink
Fix composer shortcut detaching a reply (#7041)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon authored Dec 10, 2024
1 parent bee50c3 commit 8615598
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/state/shell/composer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,13 @@ export function Provider({children}: React.PropsWithChildren<{}>) {
'exclamation-circle',
)
} else {
setState(opts)
setState(prevOpts => {
if (prevOpts) {
// Never replace an already open composer.
return prevOpts
}
return opts
})
}
})

Expand Down

0 comments on commit 8615598

Please sign in to comment.