A small patch release with a single stability fix: charts that are torn down before they ever mount no longer throw.
Fixes
destroy() no longer throws on an un-mounted / detached chart
Calling destroy() (or an internal clear()) on a chart that never finished rendering threw:
TypeError: Cannot read properties of undefined (reading 'node')
This happened when a chart was constructed against an element that wasn't connected to the DOM - so create() bailed out early before building the SVG, leaving w.dom.Paper undefined - and the chart was then destroyed. Common triggers:
- A React
useEffectcleanup (or a Vueunmountedhook) tearing the chart down before the element was ever attached. - A queued resize/
update()firing after the host element had already been removed.
The teardown path now guards on the SVG actually having been created, cancels any pending resize redraw, and tolerates a missing Apex._chartInstances registry, so destroying a never-mounted chart is a safe no-op.
Fixes react-apexcharts#602 and vue-apexcharts#256.