Chore/efs pasting again (#33847)

fix pasting multiple times
This commit is contained in:
Terry Sutton authored and Joshen Lim committed 2025-03-05 15:39:01 +01:00
1 parent 5418e81efe
commit 39c4b051e6
1 file changed
+4 -1
@@ -82,7 +82,10 @@ const AddNewSecretForm = () => {
}
if (pairs.length) {
form.setValue('secrets', pairs)
const currentSecrets = form.getValues('secrets')
// Filter out any empty pairs before combining
const nonEmptySecrets = currentSecrets.filter((secret) => secret.name || secret.value)
form.setValue('secrets', [...nonEmptySecrets, ...pairs])
}
}