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

Fix issue where router would initialize before primaryShopId was available #2982

Merged
merged 3 commits into from
Sep 29, 2017

Conversation

mikemurray
Copy link
Member

@mikemurray mikemurray commented Sep 29, 2017

Paired with @spencern on this, and after some struggle, a simple solution appears before us.

  • Add a check to wait on reactive var Reaction.primaryShopId in addition to the subscriptions before initializing the router.

To test:

  • Sign in/out ~10 times
  • Hard refresh ~10 times

While doing the above, observe no grey screen, no missing components and the app still functions as expected.

…able.

- Revert back to using subscription manager.
- Add a check to wait on reactive var `Reaction.primaryShopId` in addition to the subscriptions before initializing the router.
Reintroduce local subscriptions in thr router startup to fix the resurfaced issues with a blank screen and missing shops on sign in/out. This, with the addition of the check for primaryShopId, fixes issues for both sign in/out as well as hard refreshes.
Copy link
Member

@kieckhafer kieckhafer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logged in / out 10 times.
Refreshed 10 times.
Tests pass.

Everything seems to work smoothly.

@kieckhafer kieckhafer merged commit 1f5cc5f into marketplace Sep 29, 2017
@kieckhafer kieckhafer deleted the mm-fix-issue-2975 branch September 29, 2017 20:10
@spencern spencern mentioned this pull request Oct 11, 2017
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.

2 participants