handle undefined realEstateType

This commit is contained in:
Bilal Catic
2019-05-22 13:19:27 +02:00
parent c64ee42914
commit fc1275566e

View File

@@ -10,7 +10,7 @@ const postSize = async (req, res) => {
const realEstateType = getRealEstateTypeEnum(request.realEstateType);
const nextStep = realEstateType.hasGardenSize ? 'okucnica' : 'cijena';
const nextStep = realEstateType && realEstateType.hasGardenSize ? 'okucnica' : 'cijena';
const nextStepPage = req.query.nextStep || nextStep;
const nextStepUrl = `/${nextStepPage}/${request.uniqueId}`;