handle undefined realEstateType
This commit is contained in:
@@ -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}`;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user