We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 87c1204 + 41b6c7b commit 6e9729bCopy full SHA for 6e9729b
src/utils/remove.js
@@ -2,8 +2,8 @@ import _ from 'lodash'
2
3
export const removeEmpty = (obj) => {
4
return _.transform(obj, function (result, value, key) {
5
- if (!_.isEmpty(value) || _.isBoolean(value)) {
6
- if (typeof value === 'object') {
+ if (!_.isEmpty(value) || _.isBoolean(value) || _.isDate(value)) {
+ if (typeof value === 'object' && !_.isDate(value)) {
7
result[key] = removeEmpty(value)
8
} else {
9
result[key] = value
0 commit comments