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

[2.x] v-bind not removing attributes with falsy values when another attribute with .prop modifier appears first #4432

Closed
JosephusPaye opened this issue Dec 10, 2016 · 1 comment · Fixed by #4435
Labels

Comments

@JosephusPaye
Copy link

Howdy!

It seems like v-bind is not removing attributes with falsy values when another attribute with the .prop modifier appears first in the element's list of attributes. More details in the comments of the fiddle.

Vue.js version

2.x (Tested with 2.1.3 and 2.1.4)

Reproduction Link

http://jsfiddle.net/JosephusPaye/df4Lnuw6/78/

Steps to reproduce

  1. Run the fiddle
  2. Inspect the rendered elements using devtools to see the problem described

What is Expected?

v-bind should remove attributes whose values are falsy (false, null, undefined) regardless of the presence of other attributes and the .prop modifier.

What is actually happening?

Attributes with falsy values are not removed when another attribute with the .prop modifier appears first. Instead, these attributes are rendered with the string "false", "null" or "undefined" as their value.

yyx990803 pushed a commit that referenced this issue Dec 11, 2016
* reset isProp value

* add test case

* update test case

* fix typo
@JosephusPaye
Copy link
Author

Thank you!

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

Successfully merging a pull request may close this issue.

2 participants