Skip to content

Commit

Permalink
SBERDOMA-906 validate settlement only if settlement provided
Browse files Browse the repository at this point in the history
  • Loading branch information
MrFoxPro committed Jul 30, 2021
1 parent 513d9f3 commit d649eb3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ const BasePropertyForm: React.FC<IPropertyFormProps> = (props) => {
<AddressSuggestionsSearchInput
onSelect={(_, option) => {
const address = JSON.parse(option.key) as AddressMeta
if (!validSettlementTypes.includes(address.data.settlement_type_full)) {
if (address.data.settlement_type_full && !validSettlementTypes.includes(address.data.settlement_type_full)) {
setAddressValidatorError(UnsupportedPropertyErrorMsg.replace('{propertyType}', address.data.settlement_type_full))
}
else if (!validHouseTypes.includes(address.data.house_type_full)) {
Expand Down

0 comments on commit d649eb3

Please sign in to comment.