Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invalid Date object throws RangeError: Invalid time value #605

Closed
ttoohey opened this issue Mar 21, 2021 · 1 comment
Closed

invalid Date object throws RangeError: Invalid time value #605

ttoohey opened this issue Mar 21, 2021 · 1 comment

Comments

@ttoohey
Copy link
Contributor

ttoohey commented Mar 21, 2021

the following example throws an error

reactElementToJSXString(<div foo={new Date(NaN)} />)
 RangeError: Invalid time value
 at Date.toISOString (<anonymous>)
ttoohey added a commit to ttoohey/react-element-to-jsx-string that referenced this issue Mar 21, 2021
calling toISOString() on an invalid Date object will throw a Range Error
armandabric pushed a commit that referenced this issue Apr 7, 2021
calling toISOString() on an invalid Date object will throw a Range Error
@armandabric
Copy link
Collaborator

Thanks for your PR !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants