You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had the issue that the persisted value got set to undefined in the local storage. Debugging in chrome showed the key in the localStorage listed, but with value undefined set. Note that the value was set undefined, not to the string "undefined"
For some unknown reason this ends to the json object beeing the string "undefined". Therefore line 6 of createStorage.js fails to catch it and it tries to parse the string 'undefined' as json. What leads to the error.
Is: return json === null || typeof json === "undefined" ? ...
Fix: return json === null || json === 'undefined' || typeof json === "undefined" ? ...
Environment: Chrome, windows 10, Visual Code, React
The text was updated successfully, but these errors were encountered:
Same here. Some users got undefined for some reason and it is causing crashes now. I was trying to find a way to handle the error using the library itself but I'm not sure if that is possible. I had to make a work around to validate the storage item before using the library hook. It validates only on component mounting.
I had the issue that the persisted value got set to undefined in the local storage. Debugging in chrome showed the key in the localStorage listed, but with value undefined set. Note that the value was set undefined, not to the string "undefined"
For some unknown reason this ends to the json object beeing the string "undefined". Therefore line 6 of createStorage.js fails to catch it and it tries to parse the string 'undefined' as json. What leads to the error.
Is: return json === null || typeof json === "undefined" ? ...
Fix: return json === null || json === 'undefined' || typeof json === "undefined" ? ...
Environment: Chrome, windows 10, Visual Code, React
The text was updated successfully, but these errors were encountered: