Merge pull request #920 from adarshlilha/bugfix/environment-save-empty-secret

fix(#904): fix environment save when empty secret exists
This commit is contained in:
Anoop M D 2023-11-18 10:43:13 +05:30 committed by GitHub
commit a7e2f08efc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,7 +32,7 @@ const EnvironmentVariables = ({ environment, collection }) => {
secret: Yup.boolean(),
type: Yup.string(),
uid: Yup.string(),
value: Yup.string().trim()
value: Yup.string().trim().nullable()
})
),
onSubmit: (values) => {
@ -114,7 +114,7 @@ const EnvironmentVariables = ({ environment, collection }) => {
className="mousetrap"
id={`${index}.name`}
name={`${index}.name`}
value={formik.values[index].name}
value={variable.name}
onChange={formik.handleChange}
/>
<ErrorMessage name={`${index}.name`} />