Skip to content

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

Closed

Description

@maximsondv

When a user navigates to a new page after exporting chart, the content is not displayed.
Console gives error TypeError: Cannot read property 'forExport' of undefined
TypeError: Cannot read property 'forExport' of undefined

Product version
highcharts: 7.2.1, angular: 8.1.2, angular-highcharts: 8.0.3

Affected browser(s)
Only tested on Chrome.

Activity

  1. nisaanwaar commented on Oct 4, 2022

    @nisaanwaar

    did you solve this?

  2. cebor commented on Jul 23, 2026

    @cebor
    Owner

    Resolved: the forExport-on-destroy crash was caused by Highcharts re-invoking the chart callback with a throwaway export copy, which overwrote the stored chart reference with one Highcharts immediately frees. Current versions guard against that doubled callback (if (!this.ref)), so the reference stays pinned to the live chart and destroy() no longer dereferences a freed chart. Regression coverage added in #401. Closing as fixed — please reopen if it still occurs on a current release.

  3. added a commit that references this issue on Jul 23, 2026
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