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

empty class is rendered although I return false #10791

Closed
271ch opened this issue Nov 3, 2019 · 1 comment

Comments

@271ch
Copy link

@271ch 271ch commented Nov 3, 2019

Version

2.6.10

Reproduction link

https://codesandbox.io/s/vue-template-cob7z

Steps to reproduce

Execute the application and look at the the 2nd level div element in the body.

What is expected?

I expect <div>

What is actually happening?

I get <div class="">

This behaviour is in contrast with the otherwise normal behaviour of the vue framework of hiding elements with a false value.

@posva

This comment has been minimized.

Copy link
Member

@posva posva commented Nov 3, 2019

class and style have a proper handling and, differently from other attributes, when set to undefined, they keep the empty attribute on the element, probably for performance reasons

@posva posva closed this Nov 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.