✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
⚾️ It's finally Baseball season! Root for the home team... & Register for our Sports Analytics Webinar!

TypeError: t.emit is not a function

After use Plotly.purge(graphDiv) to destroy Plotly chart instance and clear graphDiv, error message was displayed in the console:

plotly-latest.min.js:57 Uncaught (in promise) TypeError: t.emit is not a function
at plotly-latest.min.js:57
(anonymous) @ plotly-latest.min.js:57


Can you share a reproducible example to help us debug?

Additional note from my side, before call Plotly.purge(graphDiv), there was deleted the graphDiv.data, i.e. graphDiv.data.length == 0