Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

null pointer exception #7611

Closed
pdeva opened this issue Jan 4, 2018 · 1 comment
Closed

null pointer exception #7611

pdeva opened this issue Jan 4, 2018 · 1 comment

Comments

@pdeva
Copy link

@pdeva pdeva commented Jan 4, 2018

Expected behaviour

No exception to be thrown

Actual behaviour

highcharts.js:198 Uncaught TypeError: Cannot read property 'destroy' of null
    at a.Pointer.drop (highcharts.js:198)
    at HTMLDocument.onDocumentMouseUp (highcharts.js:199)
drop @ highcharts.js:198
onDocumentMouseUp @ highcharts.js:199

Live demo with steps to reproduce

I am creating the chart in React, with config like:

chart: {
  events : {
  selection: function (event) {
    //do something that destroys react component
  }
 }
}

Basically when the user selects a range in the chart, the react component destructs and loads a new component with the data for the selected time range.

However, it seems the highcharts chart when destroyed this way, results in a null pointer exception

Affected browser(s)

All browsers.

Highcharts 6.

@pawelfus
Copy link
Contributor

@pawelfus pawelfus commented Jan 4, 2018

Hi @pdeva

Thank you for reporting this bug.

Standalone demo:
http://jsfiddle.net/wn1LLLjx/1/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants