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

v-for shows 'undefined' for empty lists #6793

Closed
ppasieka opened this issue Oct 13, 2017 · 1 comment
Closed

v-for shows 'undefined' for empty lists #6793

ppasieka opened this issue Oct 13, 2017 · 1 comment

Comments

@ppasieka
Copy link

Version

2.5.0

Reproduction link

http://jsfiddle.net/gfnz6wda/2/

Steps to reproduce

I have a list with template like

<ul>
  <li v-for="todo in todos">
    {{ todo }}
  </li>
  <li v-if="!todos.length">No todos at this moment.</li>
</ul>

where in case of empty list some fallback li element is shown.

After update to 2.5 - empty todos array - renders undefined.

like this

undefined
No todos at this moment.

What is expected?

Do not render 'undefined' for empty array

What is actually happening?

Renders 'undefined'.


hope it is a bug... because I have quite a lot cases like that in my app
Thx

@posva
Copy link
Member

posva commented Oct 13, 2017

Looks like it was already fixed #6790

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

No branches or pull requests

2 participants