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 #9571, rendering async components after initial context was destroyed #9572

Merged
merged 3 commits into from
Feb 28, 2019

Conversation

maoberlehner
Copy link
Contributor

@maoberlehner maoberlehner commented Feb 25, 2019

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No
  • Maybe (I'm not sure)

If yes, please describe the impact and migration path for existing applications:

The PR fulfills these requirements:

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

Other information:

I have not heavily tested this in a lot of circumstances. The async part of it almost broke my brain ^^ But tests are passing, so... ¯_(ツ)_/¯

@maoberlehner maoberlehner changed the title fix vuejs#9571, rendering async components after route change fix #9571, rendering async components after route change Feb 26, 2019
@maoberlehner maoberlehner changed the title fix #9571, rendering async components after route change fix #9571, rendering async components after initial context was destroyed Feb 26, 2019
}

if (owner) owner.$on('hook:destroyed', () => removeOwner(owner))

Copy link
Contributor Author

@maoberlehner maoberlehner Feb 26, 2019

Choose a reason for hiding this comment

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

This stuff isn't mandatory. It doesn't break anything if destroyed owners are force updated. But it might be cleaner to remove them.

// already pending
factory.owners.push(owner)
} else {
if (!isDef(factory.owners)) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not too happy with double checking for isDef(factory.owners) here and above but cleaner than moving this block above the block which returns the loadingComp I guess?!

@yyx990803 yyx990803 merged commit ed34113 into vuejs:dev Feb 28, 2019
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