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

Invalid template ref type using template tag with v-if #725

Closed
exodusanto opened this issue Feb 14, 2020 · 5 comments
Closed

Invalid template ref type using template tag with v-if #725

exodusanto opened this issue Feb 14, 2020 · 5 comments

Comments

@exodusanto
Copy link

exodusanto commented Feb 14, 2020

Version

3.0.0-alpha.4

Reproduction link

http://none.sorry

Steps to reproduce

In my root component i have this code:

<template>
  <div>
    <template v-if="isDesktop">
      You are on desktop view
    </template>
    <template v-else-if="isTablet">
      You are on tablet
    </template>
  </div>
</template>
<script>
...

What is expected?

isDesktop and isTablet are refs updated at window resize.
In any window size I can't see either of them
If I use a div instead it works

What is actually happening?

In console

[Vue warn]: Invalid template ref type: null (object) 
  at <Anonymous> (Root)
@exodusanto
Copy link
Author

Maybe related to #724 but I have this error at runtime and the example is more simple

@yyx990803
Copy link
Member

The actual warning should be Invalid HostVNode type: undefined, right? (If I am right, this is exactly why you should provide an actual repro)

@exodusanto
Copy link
Author

exodusanto commented Feb 14, 2020

Right. Is there any codesandbox template with Vue 3?

@yyx990803
Copy link
Member

You can easily provide repro using the global build: https://unpkg.com/browse/vue@3.0.0-alpha.4/dist/

@exodusanto
Copy link
Author

Ok... so no need of the repo link 😄

@github-actions github-actions bot locked and limited conversation to collaborators Nov 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants