I am getting features object and assigning to constants according to their values
const {
featureCode,
featureSubType,
contentId,
price,
family: {
relationCountsConfig: { motherCount, fatherCount, childrenCount },
maxFamilyMembersCount
},
featureWeight
} = feature;
Some time feature.family
return {} empty object
.
I am getting mother count undefined error.
How do we handle when it's assigning to constants.