c3js / c3

:bar_chart: A D3-based reusable chart library
http://c3js.org
MIT License
9.33k stars 1.39k forks source link

Cannot read property 'remove' of null #2735

Open a-t-k opened 4 years ago

a-t-k commented 4 years ago

Hi,

i am working on project where i use AngularJs, d3, c3 and c3.angular.js directive.

I created new angularJs directive only for showing bar chart. When $destroy event is fired i do call destroy() method on created chart-object.

After 10 Sek. error is thrown.

angular.js:13920 TypeError: Cannot read property 'remove' of null at n.destroy (c3.min.js:2) at c3-angular.min.js:5 at angular.js:19612 at completeOutstandingRequest (angular.js:5964) at angular.js:6243

In c3.js its this code what do problems: return e.resizeFunction.remove()

please check "null" before "remove" is called.

tx