Skip to content

Conversation

@monfera
Copy link
Contributor

@monfera monfera commented Oct 5, 2016

Lib.coerce2 to return original value for 0, "", NaN, null rather than false
Perform logic such that a specified zero value doesn't mean false in the contour logic

@monfera monfera changed the title Lib.coerce2 to return original value for 0, "", NaN, null rather than false Handle actual zero values as other numbers rather than as unsupplied Oct 5, 2016
var contourStart = Lib.coerce2(traceIn, traceOut, attributes, 'contours.start'),
contourEnd = Lib.coerce2(traceIn, traceOut, attributes, 'contours.end'),
autocontour = coerce('autocontour', !(contourStart && contourEnd));
autocontour = coerce('autocontour', contourStart === false || contourEnd === false);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great. @monfera would you mind adding a test case for this in the contour_test.js suite?

@etpinard etpinard added bug something broken status: reviewable labels Oct 5, 2016
@etpinard
Copy link
Contributor

etpinard commented Jan 6, 2017

done in #1280

@etpinard etpinard closed this Jan 6, 2017
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.

2 participants