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

Config variables set to 0 won't bind if there is a default #361

Closed
lilasquared opened this issue Jun 14, 2014 · 3 comments
Closed

Config variables set to 0 won't bind if there is a default #361

lilasquared opened this issue Jun 14, 2014 · 3 comments
Labels
C-bug Category: This is a bug resolved maybe

Comments

@lilasquared
Copy link

There are places such as line 575:

if (__padding_right) {
  return __padding_right;
}

Where if 0 is entered in the config it will skip because zero parses as false in an if statement. Changing lines like this to:

if (typeof __padding_right != 'undefined') {
  return __padding_right;
}

Should resolve the issue. If I knew enough about GitHub and pull requests and such I would make the change but I am a newb =]

@yuvii
Copy link
Contributor

yuvii commented Jun 15, 2014

Hi. I'm not @masayuki0812 but I'm trying to help him out.

Yes, this is a problem with a lot of user-defined options in c3. It will probably be resolved in the upcoming refactoring. If you'd like to contribute, please join the c3 google group:
https://groups.google.com/forum/?hl=en#!forum/c3js

masayuki0812 added a commit that referenced this issue Jun 15, 2014
@masayuki0812
Copy link
Member

Hi, Thank you for looking into this. You're right. I fixed to accept 0.
As @yuvii wrote, We will start refactoring in the near future. So please join if you'd like.

@masayuki0812
Copy link
Member

I'll close this issue. Please open a new topic in google group if needed. Thanks.
https://groups.google.com/forum/#!forum/c3js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug resolved maybe
Projects
None yet
Development

No branches or pull requests

3 participants