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(unrefElement): don't return the Vue instance when $el is null/undefined #1657

Merged
merged 3 commits into from Jun 16, 2022

Commits on Jun 2, 2022

  1. fix(unrefElement): don't return the Vue instance when $el is null

    …/`undefined`
    
    When using unrefElement on a template ref of a Vue component which is not available (`v-if="false"`) it returns the Vue instance object with `{ $el: null }`. It should return `null` instead of the Vue instance object.
    
    The cause of this bug is how `plain` is checked to be a VueInstance. Rather than using the value of `$el`, it should check if it has a property named `$el`.
    DrJume committed Jun 2, 2022
    Copy the full SHA
    bd38747 View commit details
    Browse the repository at this point in the history
  2. test(unrefElement): add tests

    DrJume committed Jun 2, 2022
    Copy the full SHA
    8d9bf2a View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    d034a39 View commit details
    Browse the repository at this point in the history