Skip to content

Commit

Permalink
Fix issue #98: workaround to check date object
Browse files Browse the repository at this point in the history
  • Loading branch information
sjnho committed Mar 22, 2024
1 parent a1c1488 commit d4f4178
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/valueToKey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const valueToKey = (input: any, seen?: Set<object>): Key | Key[] => {
throw new DataError();
}
return input;
} else if (input instanceof Date) {
} else if (Object.prototype.toString.call(input) === "[object Date]") {
const ms = input.valueOf();
if (isNaN(ms)) {
throw new DataError();
Expand Down

0 comments on commit d4f4178

Please sign in to comment.