mirror of
https://github.com/usebruno/bruno.git
synced 2025-07-15 11:45:32 +02:00
fix: validate env name fn null checks
This commit is contained in:
@ -13,7 +13,7 @@ const CreateEnvironment = ({ collection, onClose }) => {
|
|||||||
|
|
||||||
// todo: Add this to global env too.
|
// todo: Add this to global env too.
|
||||||
const validateEnvironmentName = (name) => {
|
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({
|
const formik = useFormik({
|
||||||
|
Reference in New Issue
Block a user