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

Comments

Projects
None yet
2 participants
@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

This comment has been minimized.

Show comment
Hide comment
@pawelfus

pawelfus Jan 4, 2018

Contributor

Hi @pdeva

Thank you for reporting this bug.

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

Contributor

pawelfus commented Jan 4, 2018

Hi @pdeva

Thank you for reporting this bug.

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

@pawelfus pawelfus added the Bug label Jan 4, 2018

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