diff --git a/packages/bruno-app/src/components/Environments/EnvironmentSettings/CreateEnvironment/index.js b/packages/bruno-app/src/components/Environments/EnvironmentSettings/CreateEnvironment/index.js index 95dc550c8..ee1b5dea8 100644 --- a/packages/bruno-app/src/components/Environments/EnvironmentSettings/CreateEnvironment/index.js +++ b/packages/bruno-app/src/components/Environments/EnvironmentSettings/CreateEnvironment/index.js @@ -13,7 +13,7 @@ const CreateEnvironment = ({ collection, onClose }) => { // todo: Add this to global env too. const validateEnvironmentName = (name) => { - return !collection.environments.some((env) => env?.name?.toLowerCase().trim() === name?.toLowerCase().trim()); + return !collection?.environments?.some((env) => env?.name?.toLowerCase().trim() === name?.toLowerCase().trim()); }; const formik = useFormik({