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 instance reuse bug in out-in transition #1874 #2127

Merged
merged 1 commit into from
Jul 2, 2018

Conversation

PeachScript
Copy link
Contributor

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

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:

This is a PR for #1874 , cc: @LinusBorg

@PeachScript PeachScript changed the title fix: instance reuse bug in out-in transition (fix #1874) fix instance reuse bug in out-in transition #1874 Mar 26, 2018
@posva
Copy link
Member

posva commented Mar 26, 2018

Thanks, tested and looks good. I want to see if it is worth to add a test before merging

@posva posva added the bug label Mar 26, 2018
@PeachScript
Copy link
Contributor Author

@posva my pleasure! This is exactly what I want to ask, should I add unit test for this bug?

@posva
Copy link
Member

posva commented Mar 26, 2018

I think adding a unit test for this would be a bit too complicated at the moment 🙁
So, don't worry for the moment, this looks fine. I'll have to test manually on IE, if you can check that (IE 9-11) I'd be grateful but don't worry if you can, I'll eventually do it anyways 🙂

@PeachScript
Copy link
Contributor Author

@posva I'd be glad to help :P

I've tested IE9 ~ 11 in the virtual machines, the transition feature looks well and this bug did not happened, beforeRouteEnter and mounted can get the correct instance every time.

Screenshots:

image

image

image

@PeachScript
Copy link
Contributor Author

And other examples also work well, except the discrete-components example, it will throw error because the NodeList has not forEach method in IE:

// examples/discrete-components/app.js L33
document.querySelectorAll('.app').forEach((node) => {
  new BaseVue({
    el: node
  })
})

@PeachScript PeachScript changed the title fix instance reuse bug in out-in transition #1874 Fix instance reuse bug in out-in transition #1874 Mar 28, 2018
@PeachScript
Copy link
Contributor Author

Hello @posva , any update on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants