You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Vue renders the text node "undefined" as the first child of an element that appears through a changed v-if condition (same applies for v-show) if it replaces an element that uses v-html.
The text was updated successfully, but these errors were encountered:
pvorb
changed the title
Vue renders "undefined" when v-if condition changes
Vue renders undexpected "undefined" when v-if condition changes
Nov 4, 2016
pvorb
changed the title
Vue renders undexpected "undefined" when v-if condition changes
Vue renders unexpected "undefined" when v-if condition changes
Nov 4, 2016
Using v-html on the first element seems to play an important role in this issue. It's sufficient to set v-html="''". Once you remove the directive though, everything is rendered just fine.
Vue renders the text node "undefined" as the first child of an element that appears through a changed v-if condition (same applies for v-show) if it replaces an element that uses v-html.
Vue.js version
2.0.2, 2.0.3 (no other versions tested)
Reproduction Link
http://jsfiddle.net/5sH6A/860/
Steps to reproduce
In the JSFiddle, click the text "click me!" and you'll see the unexpected text "undefined" before
<p>[deleted]</p>
.Using a template like this one:
When
comment.status
changes from'PUBLIC'
to'DELETED'
, instead of only showing the v-else part of the template, an unexpected undefined is rendered.What is Expected?
The nodes from the template
should be rendered.
What is actually happening?
The nodes equivalent to
are rendered.
The text was updated successfully, but these errors were encountered: