diff --git a/ruoyi-ui/src/utils/ruoyi.js b/ruoyi-ui/src/utils/ruoyi.js index 602fdd6c6..069a1aec2 100644 --- a/ruoyi-ui/src/utils/ruoyi.js +++ b/ruoyi-ui/src/utils/ruoyi.js @@ -7,7 +7,7 @@ const baseURL = process.env.VUE_APP_BASE_API // 日期格式化 export function parseTime(time, pattern) { - if (arguments.length === 0) { + if (arguments.length === 0 || !time) { return null } const format = pattern || '{y}-{m}-{d} {h}:{i}:{s}'