i have map function that is returning empty object for the array now if i check array _isEmpty
this condition should satisfy but its not getting into if statement. Any idea what is implemented wrong or better approach ?
main.js
const validateResponse = _.map(drugs ,validateValues);
now validateResponse returns [{}] and it should satisfy condition
if (_.isEmpty(validateResponse)) {
throw invalidPriceError;
}