Skip to content

Commit

Permalink
Merge pull request usebruno#3578 from lohxt1/fix/validate-env-name-va…
Browse files Browse the repository at this point in the history
…lidations

fix: validate env name fn null checks
  • Loading branch information
lohxt1 authored Dec 2, 2024
2 parents eb6944a + 5f5cc5e commit fd22ff8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down

0 comments on commit fd22ff8

Please sign in to comment.