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: handle shallowMount on components with v-if and scoped slots #1663

Merged

Conversation

xanf
Copy link
Contributor

@xanf xanf commented Aug 23, 2020

vuejs/vue@d9b27a9 introduced a new $key property, stored inside scopedSlots to solve issues when component with scoped-slots is rendered inside v-if

As for now VTU crashes when trying to shallowRender such component, since $key is not filtered out when VTU tries to invoke each slot. This MR fixes this behavior

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

The PR fulfills these requirements:

@lmiller1990 lmiller1990 self-requested a review August 29, 2020 10:05
Copy link
Member

@lmiller1990 lmiller1990 left a comment

Choose a reason for hiding this comment

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

Thanks! I will release this within 1h.

Trust the GitLab team to find the smallest bugs. Maybe before each release of Vue and VTU we should run them against the GitLab test suite :D

@lmiller1990 lmiller1990 merged commit 41f2b2b into vuejs:dev Aug 29, 2020
@lmiller1990
Copy link
Member

@xanf
Copy link
Contributor Author

xanf commented Aug 29, 2020

@lmiller1990 thank you for you trust :) I'm migrating our codebase from beta.30 to 1.0.5, trying also to remove all possible deprecation warnings - some are quite painful :(

@xanf xanf deleted the xanf-fix-shallow-mount-with-v-if-and-scoped-slots branch August 29, 2020 18:25
@lmiller1990
Copy link
Member

lmiller1990 commented Aug 30, 2020

@xanf if you feel the deprecations are inappropriate can you please make an issue (for the ones you don't agree with).

I thought about this a little more lately and I think we were too aggressive with the them. I think exists and possibly visible should come back. What do you think?

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.

None yet

2 participants