From 188ff03a286339975293329e4670bfcdaa05e1b4 Mon Sep 17 00:00:00 2001 From: cooper <1322849632@qq.com> Date: Sun, 8 Mar 2020 13:56:49 +0800 Subject: [PATCH] fix bug --- src/utils/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/index.js b/src/utils/index.js index 2684e3c2..3d0369ab 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -14,7 +14,7 @@ export function parseTime(time, cFormat) { } const format = cFormat || '{y}-{m}-{d} {h}:{i}:{s}' let date - if (typeof time === 'object') { + if (typeof time === 'object' && time != null) { date = time } else { if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) {