Skip to content

Commit

Permalink
fix: validate env name fn null checks
Browse files Browse the repository at this point in the history
  • Loading branch information
lohxt1 authored Dec 2, 2024
1 parent b4ea101 commit 5f5cc5e
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 5f5cc5e

Please sign in to comment.