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

@mantine/hooks] use-local-storage: Fix error when localStorage is null #2613

Merged
merged 1 commit into from Oct 3, 2022
Merged

Conversation

kdrag0n
Copy link
Contributor

@kdrag0n kdrag0n commented Oct 3, 2022

By default, window.localStorage is set to null in Android WebViews unless the embedding app has explicitly enabled storage, leading to an uncaught exception in this hook. Fix it by checking for null and returning the default value.

By default, `window.localStorage` is set to null in Android WebViews
unless the embedding app has explicitly enabled storage, leading to an
uncaught exception in this hook. Fix it by checking for null and
returning the default value.
@kdrag0n
Copy link
Contributor Author

kdrag0n commented Oct 3, 2022

Reformatted with Prettier, so it should pass now.

@rtivital rtivital merged commit d8115fb into mantinedev:master Oct 3, 2022
@rtivital
Copy link
Member

rtivital commented Oct 3, 2022

Thanks!

@kdrag0n
Copy link
Contributor Author

kdrag0n commented Oct 3, 2022

Thanks for the quick merge!

@kdrag0n kdrag0n deleted the patch-1 branch October 3, 2022 15:30
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

Successfully merging this pull request may close these issues.

None yet

2 participants