Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/lib/coerce.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ exports.coerce2 = function(containerIn, containerOut, attributes, attribute, dfl
var propIn = nestedProperty(containerIn, attribute),
propOut = exports.coerce(containerIn, containerOut, attributes, attribute, dflt);

return propIn.get() ? propOut : false;
return propIn.get() !== undefined ? propOut : false;
};

/*
Expand Down
2 changes: 1 addition & 1 deletion src/traces/contour/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ module.exports = function supplyDefaults(traceIn, traceOut, defaultColor, layout

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?


if(autocontour) coerce('ncontours');
else coerce('contours.size');
Expand Down