Skip to content

Commit c51a9f7

Browse files
author
skyemoe
committed
fix(shared): Change the implementation of isDate
1 parent 4a3237a commit c51a9f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/shared/src/index.ts

Lines changed: 1 addition & 1 deletion
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)