Skip to content

Commit 25400be

Browse files
committed
Fix undefined
1 parent e7a3b32 commit 25400be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/types.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ module.exports.escape = function escape(str) {
9090
}
9191

9292
module.exports.inferType = function inferType(x) {
93-
return x.type || (x instanceof Date
93+
return (x && x.type) || (x instanceof Date
9494
? 1184
9595
: Array.isArray(x)
9696
? inferType(x[0])

0 commit comments

Comments
 (0)