Skip to content

Commit

Permalink
Add conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
satkunas committed Jan 7, 2019
1 parent 44d8a1c commit 4d00758
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -614,7 +614,10 @@ export const pfConfigurationConnectionProfileViewFields = (context = {}) => {
validators: {
[i18n.t('Provisioner required.')]: required,
[i18n.t('Duplicate Provisioner.')]: conditional((value) => {
return !(connectionProfile.provisioners.filter(v => v === value).length > 1)
if (connectionProfile.provisioners === Array) {
return !(connectionProfile.provisioners.filter(v => v === value).length > 1)
}
return true
})
}
}
Expand Down

0 comments on commit 4d00758

Please sign in to comment.