From 81497d8397082f8600d348f87dfcdded05660d65 Mon Sep 17 00:00:00 2001 From: Rinku Chaudhari <76877078+therealrinku@users.noreply.github.com> Date: Tue, 16 Jul 2024 16:08:26 +0545 Subject: [PATCH] fix: active enviroment after rename when there is single enviroment (#2640) --- .../Environments/EnvironmentSettings/EnvironmentList/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/bruno-app/src/components/Environments/EnvironmentSettings/EnvironmentList/index.js b/packages/bruno-app/src/components/Environments/EnvironmentSettings/EnvironmentList/index.js index 4517bd8d..c5066e0f 100644 --- a/packages/bruno-app/src/components/Environments/EnvironmentSettings/EnvironmentList/index.js +++ b/packages/bruno-app/src/components/Environments/EnvironmentSettings/EnvironmentList/index.js @@ -43,7 +43,7 @@ const EnvironmentList = ({ selectedEnvironment, setSelectedEnvironment, collecti } } - if (prevEnvUids && prevEnvUids.length && envUids.length < prevEnvUids.length) { + if (prevEnvUids && prevEnvUids.length && envUids.length <= prevEnvUids.length) { setSelectedEnvironment(environments && environments.length ? environments[0] : null); } }, [envUids, environments, prevEnvUids]);