Explorar el Código

Fix a crash when setting a property to null

The app may crash at Wizard Summary page when creating a new replica /
migration, if setting a dropdown field to null.
Sergiu Miclea hace 5 años
padre
commit
652b88ef79
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      src/components/organisms/WizardSummary/WizardSummary.tsx

+ 2 - 2
src/components/organisms/WizardSummary/WizardSummary.tsx

@@ -310,7 +310,7 @@ class WizardSummary extends React.Component<Props> {
     const objectKeys: string[] = Object.keys(options).filter(key => typeof options[key] === 'object'
     const objectKeys: string[] = Object.keys(options).filter(key => typeof options[key] === 'object'
       && key !== INSTANCE_OSMORPHING_MINION_POOL_MAPPINGS)
       && key !== INSTANCE_OSMORPHING_MINION_POOL_MAPPINGS)
 
 
-    return objectKeys.map(key => (
+    return objectKeys.map(key => (options[key] != null ? (
       <ObjectTable key={key}>
       <ObjectTable key={key}>
         <ObjectTableTitle>
         <ObjectTableTitle>
           {LabelDictionary.get(key)}
           {LabelDictionary.get(key)}
@@ -337,7 +337,7 @@ class WizardSummary extends React.Component<Props> {
           )
           )
         })}
         })}
       </ObjectTable>
       </ObjectTable>
-    ))
+    ) : null))
   }
   }
 
 
   renderMinionPoolMapping() {
   renderMinionPoolMapping() {