Skip to content

Commit 04b98a7

Browse files
committed
chore: add early return
1 parent b9c0828 commit 04b98a7

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/Pages/Applications/DevtronApps/Details/AppConfigurations/Navigation/EnvConfigurationsNav.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,10 +319,10 @@ export const EnvConfigurationsNav = ({
319319
const parsedResourceId = +params[paramToCheck]
320320

321321
useEffect(() => {
322-
if (envId && !Number.isNaN(+envId) && shouldSetEnvInContext) {
322+
if (shouldSetEnvInContext && envId && !Number.isNaN(+envId)) {
323323
setEnvironmentId(+envId)
324324
}
325-
}, [envId])
325+
}, [envId, shouldSetEnvInContext])
326326

327327
const { isLoading } = envConfig
328328
const resourceData =

src/components/app/details/appDetails/AppDetails.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -840,6 +840,7 @@ const AppDetail = ({ detailsType, filteredResourceIds }: AppDetailProps) => {
840840
replace(newUrl)
841841
return
842842
}
843+
return
843844
}
844845

845846
const selectedAppId =

0 commit comments

Comments
 (0)