We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 188ff03 commit 95ee043Copy full SHA for 95ee043
src/utils/index.js
@@ -9,12 +9,12 @@
9
* @returns {string | null}
10
*/
11
export function parseTime(time, cFormat) {
12
- if (arguments.length === 0) {
+ if (arguments.length === 0 && time != null) {
13
return null
14
}
15
const format = cFormat || '{y}-{m}-{d} {h}:{i}:{s}'
16
let date
17
- if (typeof time === 'object' && time != null) {
+ if (typeof time === 'object') {
18
date = time
19
} else {
20
if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) {
0 commit comments