Skip to content

Commit b980fd2

Browse files
authored
fix(app): fix infinitely hanging return to dashboard (#16923)
Closes RABR-672
1 parent 6009a29 commit b980fd2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

app/src/pages/ODD/RunSummary/index.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -149,15 +149,15 @@ export function RunSummary(): JSX.Element {
149149
const { closeCurrentRun } = useCloseCurrentRun()
150150
// Close the current run only if it's active and then execute the onSuccess callback. Prefer this wrapper over
151151
// closeCurrentRun directly, since the callback is swallowed if currentRun is null.
152-
const closeCurrentRunIfValid = (onSuccess?: () => void): void => {
152+
const closeCurrentRunIfValid = (onSettled?: () => void): void => {
153153
if (isRunCurrent) {
154154
closeCurrentRun({
155-
onSuccess: () => {
156-
onSuccess?.()
155+
onSettled: () => {
156+
onSettled?.()
157157
},
158158
})
159159
} else {
160-
onSuccess?.()
160+
onSettled?.()
161161
}
162162
}
163163
const [showRunFailedModal, setShowRunFailedModal] = useState<boolean>(false)

0 commit comments

Comments
 (0)