Skip to content

Commit

Permalink
rm try-catch (useless?) in Drawing.fillGroupStyle
Browse files Browse the repository at this point in the history
  • Loading branch information
etpinard committed Oct 26, 2018
1 parent 95ecdce commit 1f3c10c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
8 changes: 1 addition & 7 deletions src/components/drawing/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,13 +198,7 @@ drawing.fillGroupStyle = function(s) {
s.style('stroke-width', 0)
.each(function(d) {
var shape = d3.select(this);
try {
shape.call(Color.fill, d[0].trace.fillcolor);
}
catch(e) {
Lib.error(e, s);
shape.remove();
}
shape.call(Color.fill, d[0].trace.fillcolor);
});
};

Expand Down
5 changes: 0 additions & 5 deletions test/jasmine/tests/scatter_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -658,10 +658,6 @@ describe('end-to-end scatter tests', function() {
// from any case to any other case.
var indices = transitions(cases.length);

// Drawing.fillGroupStyle logs an error in a try-catch when
// things go wrong
spyOn(Lib, 'error');

var p = Plotly.plot(gd, [
{y: [1, 2], text: 'a'},
{y: [2, 3], text: 'b'},
Expand Down Expand Up @@ -711,7 +707,6 @@ describe('end-to-end scatter tests', function() {
var msg = i ? ('from ' + cases[indices[i - 1]].name + ' to ') : 'from default to ';
msg += name;
assertMultiNodeOrder(selectorArray, msg);
expect(Lib.error).not.toHaveBeenCalled();
}; }

for(i = 0; i < indices.length; i++) {
Expand Down

0 comments on commit 1f3c10c

Please sign in to comment.