8000 Throw an error when redraw called on invalid gd · plotly/plotly.js@e3ccac5 · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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)
0