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
useLocalStorage converts Infinity to null #247
Comments
I disagree that this belongs here as an issue. This is exactly how the standard was defined to behave: https://stackoverflow.com/questions/1423081/json-left-out-infinity-and-nan-json-status-in-ecmascript |
Related: #253 |
It's not necessarily a software issue but coming across this I had the expectation, given that it's a blackbox function, that there were no restrictions. Only after looking at the source code I realised that it uses |
I agree with @SteveVanOpstal here: the use of If, for example, you decide to send in an object and thus get |
Seems to be related to JSON.stringify.
You can workaround this issue by not using Infinity but it would be nice to use this interface as you expect it.
The text was updated successfully, but these errors were encountered: