Skip to content

fix: For bug when cookies are disabled using window side-effects - #10846

Closed
stocaaro wants to merge 2 commits into
aws-amplify:mainfrom
stocaaro:9185-paho-mqtt-non-patch
Closed

fix: For bug when cookies are disabled using window side-effects#10846
stocaaro wants to merge 2 commits into
aws-amplify:mainfrom
stocaaro:9185-paho-mqtt-non-patch

Conversation

@stocaaro

@stocaaro stocaaro commented Jan 6, 2023

Copy link
Copy Markdown
Contributor

Description of changes

As an alternative to pulling in and fixing the paho-mqtt vendor library, this uses side-effects to catch the localStorage error, which it then replaces after Paho has loaded.

The replacement is shallow and this may very well result in unexpected side-effects in other libraries behavior.

Issue #, if available

Description of how you validated changes

Tested by:

  • loading the page with cookies enabled to confirm the base case works as expected
  • loading the page with cookies disabled to confirm that the page works with mqtt in this case as well

Checklist

  • PR description included
  • yarn test passes
  • Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@stocaaro
stocaaro requested review from a team as code owners January 6, 2023 20:48
@stocaaro stocaaro closed this Jan 11, 2023
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.

1 participant