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-style fails when value is a number #310

Closed
ryanatkn opened this issue Jun 12, 2014 · 4 comments
Closed

v-style fails when value is a number #310

ryanatkn opened this issue Jun 12, 2014 · 4 comments

Comments

@ryanatkn
Copy link

See this fiddle. It looks like this can be fixed here -

if (value){

to

if (value && value.slice){
@yyx990803
Copy link
Member

Thanks, I noticed it probably needs to cast stuff like 0 into strings too.

yyx990803 pushed a commit that referenced this issue Jun 12, 2014
@dmfilipenko
Copy link

you can just add isImportant = '' + value.slice(-10) === '!important'
without if (value != null) value += ''

@yyx990803
Copy link
Member

I want to cast it to strings. When setting style values a number 0 results in setting it to empty string instead of a value of "0".

@dmfilipenko
Copy link

👍

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

No branches or pull requests

3 participants