Просмотр исходного кода

Merge pull request #265 from smiclea/fix-wizard-options

Fix crash in Wizard's options page
Dorin Paslaru 7 лет назад
Родитель
Сommit
8a53f43fb9
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      src/components/organisms/WizardPageContent/WizardPageContent.jsx

+ 1 - 1
src/components/organisms/WizardPageContent/WizardPageContent.jsx

@@ -213,7 +213,7 @@ class WizardPageContent extends React.Component<Props, State> {
     if (schema && schema.length > 0) {
       let required = schema.filter(f => f.required && f.type !== 'object')
       schema.forEach(f => {
-        if (f.type === 'object' && f.properties && f.properties.length && f.properties.filter(p => isValid(p)).length > 0) {
+        if (f.type === 'object' && f.properties && f.properties.filter && f.properties.filter(p => isValid(p)).length > 0) {
           required = required.concat(f.properties.filter(p => p.required))
         }
       })