Skip to content

TypeError: Cannot read property 'forExport' of undefined #327

Description

@RiccardoCampese

Hi, I have a problem with this piece of code right here.
HighchartsChartComponent.prototype.ngOnDestroy = /** * @return {?} */ function () { // #44 if (this.chart) { // #56 // #56 this.chart.destroy(); this.chart = null; } };
Basically, when the onDestroy is called in my Angular component, this.chart.destroy(); throws an error:
TypeError: Cannot read property 'forExport' of undefined at c.Chart.destroy (highcharts.js:305) at HighchartsChartComponent.push.../../node_modules/highcharts-angular/fesm5/highcharts-angular.js.HighchartsChartComponent.ngOnDestroy (highcharts-angular.js:86)

Any idea on how to solve this problem? How can I make it not trigger that destroy method for my chart?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions