Skip to content

Commit fa0dc9f

Browse files
committed
chore: revert confdition for default selection
1 parent fb3a057 commit fa0dc9f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/components/app/details/cdDetails/CDDetails.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,10 @@ export default function CDDetails({ filteredEnvIds }: { filteredEnvIds: string }
224224
}
225225
})
226226

227-
if (envOptions.length && ((!envId && !isEnvDeleted) || (envId && !_selectedEnvironment))) {
227+
if (
228+
(envOptions.length === 1 && !envId && !isEnvDeleted) ||
229+
(envId && envOptions.length && !_selectedEnvironment)
230+
) {
228231
setEnvironmentId(+envOptions[0].value)
229232
replace(generatePath(path, { appId, envId: envOptions[0].value, pipelineId: envOptions[0].pipelineId }))
230233
} else if (envId && !pipelineId && _selectedEnvironment) {

0 commit comments

Comments
 (0)