Commit 9067369ce0eeaf8b4d6e0de309804361d7d25b5f
1 parent
3436f77c
防止时间为空出现的异常
Showing
1 changed file
with
1 additions
and
1 deletions
ruoyi-ui/src/utils/ruoyi.js
| ... | ... | @@ -7,7 +7,7 @@ const baseURL = process.env.VUE_APP_BASE_API |
| 7 | 7 | |
| 8 | 8 | // 日期格式化 |
| 9 | 9 | export function parseTime(time, pattern) { |
| 10 | - if (arguments.length === 0) { | |
| 10 | + if (arguments.length === 0 || !time) { | |
| 11 | 11 | return null |
| 12 | 12 | } |
| 13 | 13 | const format = pattern || '{y}-{m}-{d} {h}:{i}:{s}' | ... | ... |