Skip to content

Commit

Permalink
Merge pull request #99 from sjnho/issue-fix-98
Browse files Browse the repository at this point in the history
Fix issue #98: workaround to check date object
  • Loading branch information
dumbmatter committed May 20, 2024
2 parents 6dcf2a8 + d4f4178 commit 5bf419c
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 5bf419c

Please sign in to comment.