Skip to content

Commit

Permalink
fix: fix format error
Browse files Browse the repository at this point in the history
  • Loading branch information
yiyunwan committed Mar 9, 2023
1 parent 64dcefd commit 063de9c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/components/src/__builtins__/dayjs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,15 @@ export function dayjsable(
if (Array.isArray(value)) {
return value.map((val) => {
const date = dayjs(val, format)
return date.isValid() ? date : val
if (date.isValid()) return date
const _date = dayjs(val)
return _date.isValid() ? _date : val
})
} else {
const date = dayjs(value, format)
return date.isValid() ? date : value
if (date.isValid()) return date
const _date = dayjs(value)
return _date.isValid() ? _date : value
}
}

Expand Down

0 comments on commit 063de9c

Please sign in to comment.