Skip to content

Commit e3ccac5

Browse files
committed
Throw an error when redraw called on invalid gd
1 parent e8e1e7f commit e3ccac5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/plot_api/plot_api.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -823,8 +823,7 @@ Plotly.redraw = function(gd) {
823823
gd = getGraphDiv(gd);
824824

825825
if(!Lib.isPlotDiv(gd)) {
826-
Lib.warn('This element is not a Plotly plot.', gd);
827-
return;
826+
throw new Error('This element is not a Plotly plot: ' + gd);
828827
}
829828

830829
gd.calcdata = undefined;

0 commit comments

Comments
 (0)