This is an expected behavior. The Highcharts.charts array will store all chart references for the current Highcharts instance. When you destroy a chart, the reference in the Highcharts.charts array is changed to undefined to mark that the chart was removed. This happens also when you are creating a new chart in the place of an old chart - the old one gets destroyed before the new one is created and Highcharts.charts array is affected by the old chart reference being changed to undefined and by addition of the chart's instance reference to the end of the array.


If you are using the Highcharts.charts array to iterate over all charts you should check if any of the array elements is undefined or a chart instance reference.