We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Object.toString
1 parent e879835 commit f818fc6Copy full SHA for f818fc6
src/utils.js
@@ -6,7 +6,7 @@ export function toMilliseconds(options: Options, ...keys: Array<string>) {
6
const value = options[key];
7
8
// Is it a Date object?
9
- if (typeof value === 'object' && typeof value.getMonth === 'function') {
+ if (Object.prototype.toString.call(value) === '[object Date]') {
10
options[key] = value.getTime();
11
}
12
});
0 commit comments