Framework: Initialize localStorage polyfill at start of boot #6558
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #6555
Suspected regression in #6236 (
lib/abtest
pulls instore
)This pull request seeks to resolve an issue where Safari Private Mode does not load correctly because of an attempt to access
localStorage
(not available). OurlocalStorage
polyfill is targeted at resolving this case, but must be loaded before any dependencies making use ofstore
orlocalStorage
. This pull request moves the initialization to the top of the boot file to ensure that it is always executed first.Testing instructions:
I was never able to reproduce the original issue in development mode locally, perhaps due to some configuration flag that's only active in production (makes sense if it is ABTest related). You may want to search internal documentation for running production mode locally to verify the fix (which I did to verify resolution), else ensure that no regressions occur in using the application. Specifically, ensure that you can load Calypso in Safari Private Mode.
/cc @rachelmcr, @bisko, @blowery, @mjuhasz
Test live: https://calypso.live/?branch=fix/6555-localstorage-private