Closed YuLeven closed 4 years ago
Hi @YuLeven ! Just following up on this, let me know your thoughts!
:tada: This PR is included in version 8.0.4 :tada:
The release is available on:
npm package (@latest dist-tag)
Your semantic-release bot :package::rocket:
Currently, we're checking for localStorage's presence but not its actual usability. In some scenarios, browsers can disallow
localStorage
to be called upon and in such cases, the library will hard crash.In this change, I added a catch statement to intercept these errors and return an empty string when
localStorage
cannot be called upon.[X] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[X] I have used ESLint & Prettier to follow the code style of this project.
[X] I have updated the documentation accordingly.
[X] I have added tests to cover my changes.
[X] All new and existing tests passed.