Parcourir la source

Merge pull request #2071 from porter-dev/nico/fix-get-metadata-on-key-value-array

[POR-476] Fix application getting removed from env groups
Nicolas Frati il y a 4 ans
Parent
commit
f9758dbbb7

+ 1 - 1
dashboard/src/components/porter-form/field-components/KeyValueArray.tsx

@@ -536,7 +536,7 @@ export const getMetadata: GetMetadataFunction<KeyValueArrayMetadata> = (
   state: KeyValueArrayFieldState
 ) => {
   // We don't need any metadata for other key-value-array fields yet so we return null for that variable
-  if (!props?.variable?.includes("env")) {
+  if (!state || !props?.variable?.includes("env")) {
     return {
       [props.variable]: null,
     };