Skip to content

πŸ’Ž Version 5.15.1

Choose a tag to compare

@junedchhipa junedchhipa released this 19 Jun 16:37
· 4 commits to main since this release

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 useEffect cleanup (or a Vue unmounted hook) 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.