Closed DAcodedBEAT closed 4 months ago
@Chartjs sorry for the ping but I want to resolve this. I have asked about it about a month ago, I have provided a solution, and would like your input so I can contribute my fix.
@etimberg / @LeeLenaleee seeing that you are recent contributors, I'm pinging you both about this issue (as per the recommendation from the support discord).
@DAcodedBEAT the proposed changes make sense to me if you'd like to send a PR
Thanks @etimberg! I opened https://github.com/chartjs/Chart.js/pull/11685 :)
Expected behavior
addEventListener
andremoveEventListener
should only be callable on valid defined and non-null elements.Current behavior
From sentry:
Reproducible sample
.
Optional extra steps/info to reproduce
No response
Possible solution
Here is what I am proposing: https://github.com/DAcodedBEAT/Chart.js/commit/8930d1913ab206e008aaab3d18638bffc3aa73ba
Context
I've seen a few related errors in other implementations according their Github issues
I made a new Github issue since https://github.com/chartjs/Chart.js/issues/11295#issuecomment-1924667017 has been ignored for 3 weeks
I didn't make the Pull Request since https://github.com/chartjs/Chart.js/blob/master/docs/developers/contributing.md advised against it but I made this issue since I was redirected from the discord chat to here (after the first inquiry was ignored)
chart.js version
4.4.1
Browser name and version
Chrome >=120 and Edge >= 120 according to my project's Sentry, but probably many others
Link to your project
No response