Skip to content

Commit 1f3c10c

Browse files
committed
rm try-catch (useless?) in Drawing.fillGroupStyle
1 parent 95ecdce commit 1f3c10c

File tree

2 files changed

+1
-12
lines changed

2 files changed

+1
-12
lines changed

Diff for: src/components/drawing/index.js

+1-7
Original file line numberDiff line numberDiff line change
@@ -198,13 +198,7 @@ drawing.fillGroupStyle = function(s) {
198198
s.style('stroke-width', 0)
199199
.each(function(d) {
200200
var shape = d3.select(this);
201-
try {
202-
shape.call(Color.fill, d[0].trace.fillcolor);
203-
}
204-
catch(e) {
205-
Lib.error(e, s);
206-
shape.remove();
207-
}
201+
shape.call(Color.fill, d[0].trace.fillcolor);
208202
});
209203
};
210204

Diff for: test/jasmine/tests/scatter_test.js

-5
Original file line numberDiff line numberDiff line change
@@ -658,10 +658,6 @@ describe('end-to-end scatter tests', function() {
658658
// from any case to any other case.
659659
var indices = transitions(cases.length);
660660

661-
// Drawing.fillGroupStyle logs an error in a try-catch when
662-
// things go wrong
663-
spyOn(Lib, 'error');
664-
665661
var p = Plotly.plot(gd, [
666662
{y: [1, 2], text: 'a'},
667663
{y: [2, 3], text: 'b'},
@@ -711,7 +707,6 @@ describe('end-to-end scatter tests', function() {
711707
var msg = i ? ('from ' + cases[indices[i - 1]].name + ' to ') : 'from default to ';
712708
msg += name;
713709
assertMultiNodeOrder(selectorArray, msg);
714-
expect(Lib.error).not.toHaveBeenCalled();
715710
}; }
716711

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

0 commit comments

Comments
 (0)