-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
fix(query-sync-storage-persister): Relax undefined check against storage to handle null values #5095
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 89dc2b2:
|
@nfm doesn't the async persister have the same guard? |
Fixes TanStack#4957. On Android WebView if `setDomStorageEnabled` is not configured, `window.localStorage` will be `null` (rather than `undefined`). Relax the existing conditional to check if `storage` is present to handle both `null` and `undefined` values to remove a gotcha here.
f6f21b6
to
620e3b4
Compare
It looks like this failed a test but I'm not sure why - from what I can gather it looks unrelated:
Please let me know if I've done something silly here 🙃 |
…android-webview-if-setdomstorageenabled-is-not-configured
just our standard test flakiness ... working on it 😅 |
Fixes #4957.
On Android WebView if
setDomStorageEnabled
is not configured,window.localStorage
will benull
(rather thanundefined
).Relax the existing conditional to check if
storage
is present to handle bothnull
andundefined
values to remove a gotcha here.