Skip to content

Commit eef1447

Browse files
authored
fix(shared): improve isDate check (#5803)
1 parent 4d7803e commit eef1447

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/shared/src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export const isMap = (val: unknown): val is Map<any, any> =>
5252
export const isSet = (val: unknown): val is Set<any> =>
5353
toTypeString(val) === '[object Set]'
5454

55-
export const isDate = (val: unknown): val is Date => val instanceof Date
55+
export const isDate = (val: unknown): val is Date => toTypeString(val) === '[object Date]'
5656
export const isFunction = (val: unknown): val is Function =>
5757
typeof val === 'function'
5858
export const isString = (val: unknown): val is string => typeof val === 'string'

0 commit comments

Comments
 (0)