Skip to content

Commit

Permalink
fix(app): fix error recovery crashing the app
Browse files Browse the repository at this point in the history
  • Loading branch information
mjhuff committed Jul 30, 2024
1 parent 51838a5 commit 559dc22
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ describe('ErrorRecoveryFlows', () => {

const newProps = {
...props,
failedCommand: { ...mockFailedCommand, id: 'NEW_ID' },
failedCommand: null,
}
rerender(<ErrorRecoveryFlows {...newProps} />)
expect(mockReportErrorEvent).toHaveBeenCalledWith(newProps.failedCommand)
Expand Down
2 changes: 1 addition & 1 deletion app/src/organisms/ErrorRecoveryFlows/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export function ErrorRecoveryFlows(
const analytics = useRecoveryAnalytics()
React.useEffect(() => {
analytics.reportErrorEvent(failedCommand)
}, [failedCommand])
}, [failedCommand?.key])

const { hasLaunchedRecovery, toggleERWizard, showERWizard } = useERWizard()
const isOnDevice = useSelector(getIsOnDevice)
Expand Down

0 comments on commit 559dc22

Please sign in to comment.