Skip to content

Commit 6e9729b

Browse files
authored
Merge pull request #668 from kaizumaki/feature/fix-update-lesson
removeEmptyでDate型が除外されてしまうのを修正
2 parents 87c1204 + 41b6c7b commit 6e9729b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/utils/remove.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import _ from 'lodash'
22

33
export const removeEmpty = (obj) => {
44
return _.transform(obj, function (result, value, key) {
5-
if (!_.isEmpty(value) || _.isBoolean(value)) {
6-
if (typeof value === 'object') {
5+
if (!_.isEmpty(value) || _.isBoolean(value) || _.isDate(value)) {
6+
if (typeof value === 'object' && !_.isDate(value)) {
77
result[key] = removeEmpty(value)
88
} else {
99
result[key] = value

0 commit comments

Comments
 (0)