Skip to content

Commit c460bdd

Browse files
committed
check added for calling get config api
1 parent 635ad9c commit c460bdd

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/components/ApplicationGroup/Details/TriggerView/EnvTriggerView.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,12 @@ export default function EnvTriggerView({ filteredAppIds, isVirtualEnv }: AppGrou
141141
const abortControllerRef = useRef(new AbortController())
142142

143143
useEffect(() => {
144-
getConfigs()
145-
return () => {
146-
handledLocation.current = false
147-
}
144+
if (ApprovalMaterialModal && showApprovalModal) {
145+
getConfigs()
146+
}
147+
return () => {
148+
handledLocation.current = false
149+
}
148150
}, [])
149151

150152
useEffect(() => {

0 commit comments

Comments
 (0)