Skip to content

fix issue with bar relative mode when first bucket is 0 or string #687

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

Closed
wants to merge 2 commits into from

Conversation

keeganmccallum
Copy link
Contributor

No description provided.

@mdtusz
Copy link
Contributor

mdtusz commented Jun 27, 2016

Instead of coercing to a string, could we instead just ensure a more robust check on the case of -0?

function isPositive(x){
  return 1 / x === 1 / Math.abs(x);
}

isPositive(0) // true
isPositive(-0) // false

If you could also add a test or two for this, that would be great! Thanks for the contribution!

@etpinard etpinard added bug something broken status: reviewable labels Jun 27, 2016
@etpinard
Copy link
Contributor

etpinard commented Jul 5, 2016

@keeganmccallum I cherry-picked your commits onto the fix-bar-relative-first-bucket to add a few tests using a testing routine introduced in #716 .

I'll close this PR and make a new one (that includes your commits) as soon as #716 is merged.

Thanks again for your efforts.

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

Successfully merging this pull request may close these issues.

3 participants