diff --git a/src/factory.js b/src/factory.js index 9911014..a73271c 100644 --- a/src/factory.js +++ b/src/factory.js @@ -148,6 +148,10 @@ export default function plotComponentFactory(Plotly) { this.removeUpdateEvents(); + if (!this.el) { + return; + } + Plotly.purge(this.el); }