Skip to content

Commit ad49bf4

Browse files
committed
chore: dispatch error when showing toast
1 parent eb2c89a commit ad49bf4

File tree

1 file changed

+7
-7
lines changed
  • src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentTemplate

1 file changed

+7
-7
lines changed

src/Pages/Applications/DevtronApps/Details/AppConfigurations/MainContent/DeploymentTemplate/DeploymentTemplate.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1103,13 +1103,13 @@ const DeploymentTemplate = ({
11031103
const isReqAbortedError = getIsRequestAborted(error)
11041104
if (!isReqAbortedError) {
11051105
showError(error)
1106+
dispatch({
1107+
type: DeploymentTemplateActionType.INITIAL_DATA_ERROR,
1108+
payload: {
1109+
error,
1110+
},
1111+
})
11061112
}
1107-
dispatch({
1108-
type: DeploymentTemplateActionType.INITIAL_DATA_ERROR,
1109-
payload: {
1110-
error,
1111-
},
1112-
})
11131113
}
11141114
}
11151115

@@ -1118,7 +1118,7 @@ const DeploymentTemplate = ({
11181118
handleInitialDataLoad()
11191119

11201120
return () => {
1121-
initialServiceAbortController.current?.abort()
1121+
initialServiceAbortController.current.abort()
11221122
}
11231123
}, [])
11241124

0 commit comments

Comments
 (0)