Skip to content

Commit

Permalink
fix(app): fix infinitely hanging return to dashboard (#16923)
Browse files Browse the repository at this point in the history
Closes RABR-672
  • Loading branch information
mjhuff authored Nov 20, 2024
1 parent 6009a29 commit b980fd2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/src/pages/ODD/RunSummary/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,15 +149,15 @@ export function RunSummary(): JSX.Element {
const { closeCurrentRun } = useCloseCurrentRun()
// Close the current run only if it's active and then execute the onSuccess callback. Prefer this wrapper over
// closeCurrentRun directly, since the callback is swallowed if currentRun is null.
const closeCurrentRunIfValid = (onSuccess?: () => void): void => {
const closeCurrentRunIfValid = (onSettled?: () => void): void => {
if (isRunCurrent) {
closeCurrentRun({
onSuccess: () => {
onSuccess?.()
onSettled: () => {
onSettled?.()
},
})
} else {
onSuccess?.()
onSettled?.()
}
}
const [showRunFailedModal, setShowRunFailedModal] = useState<boolean>(false)
Expand Down

0 comments on commit b980fd2

Please sign in to comment.