From e3ccac51c57d5068ed9aede1829bc90539b84738 Mon Sep 17 00:00:00 2001 From: Ricky Reusser Date: Tue, 6 Sep 2016 12:30:36 -0600 Subject: [PATCH] Throw an error when redraw called on invalid gd --- src/plot_api/plot_api.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/plot_api/plot_api.js b/src/plot_api/plot_api.js index 7046e3adcc7..15d51de7604 100644 --- a/src/plot_api/plot_api.js +++ b/src/plot_api/plot_api.js @@ -823,8 +823,7 @@ Plotly.redraw = function(gd) { gd = getGraphDiv(gd); if(!Lib.isPlotDiv(gd)) { - Lib.warn('This element is not a Plotly plot.', gd); - return; + throw new Error('This element is not a Plotly plot: ' + gd); } gd.calcdata = undefined;