diff --git a/src/utils/remove.js b/src/utils/remove.js index 18cfdae6..626d8da7 100644 --- a/src/utils/remove.js +++ b/src/utils/remove.js @@ -2,8 +2,8 @@ import _ from 'lodash' export const removeEmpty = (obj) => { return _.transform(obj, function (result, value, key) { - if (!_.isEmpty(value) || _.isBoolean(value)) { - if (typeof value === 'object') { + if (!_.isEmpty(value) || _.isBoolean(value) || _.isDate(value)) { + if (typeof value === 'object' && !_.isDate(value)) { result[key] = removeEmpty(value) } else { result[key] = value