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

Cannot read property 'firstChild' of null error #2

Open
willviles opened this issue Mar 6, 2017 · 0 comments
Open

Cannot read property 'firstChild' of null error #2

willviles opened this issue Mar 6, 2017 · 0 comments

Comments

@willviles
Copy link
Owner

Ember Google Analytics Embed 0.1.6 release ensures all events are removed on the willDestroyElement hook. However, Google Analytics embed API still throws a Cannot read property 'firstChild' of null error if a component is removed whilst it is initializing a new chart.

// components/visualizations/base-chart.js

createVisualization() {
  // Component is present on initialization...
  const container = this.elementId;

  return new window.gapi.analytics.googleCharts.DataChart({
    chart: { container }
  }); // => But during chart insertion, component is destroyed.

  // => `Cannot read property 'firstChild' of null` from `cb=gapi.loaded_0:455`

},

Not entirely sure how to silence this error - any help appreciated!

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

No branches or pull requests

1 participant