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

Fix undefined controller error in tooltip plugin #11651

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

DrowningElysium
Copy link

Issue that has been made clear in #11596 (comment)

Issue also applies to a project of mine where the data is loaded twice, (Once from local storage and once from a result from a request), which might cause the issue.

Fix controller being undefined in tooltip plugin
@LeeLenaleee
Copy link
Collaborator

@etimberg we dissalowed optional chaining because it was not stable yet and not all platforms supported it. It seems it is stable now and every major browser supports it, except for IE 11 but we do not support that ourselfs.

I think we can use it now, what is your oppnion on it?
https://caniuse.com/?search=optional%20chaining

@etimberg
Copy link
Member

etimberg commented Feb 4, 2024

@LeeLenaleee I'm ok to use it now that it's stable

@aStarlikeMine
Copy link

I have this exact issue currently and will wait for this fix to be merged.

Our scenario happens when swopping between the graph on the dashboard and the page load from the graph click event multiple times, and only when this is done quickly.

@daviddeutsch
Copy link

daviddeutsch commented Apr 25, 2024

Just confirming that I also have this issue in my current codebase - in my case, it seems to be related to multiple graphs being loaded at the same time under a stress test. It's four graphs in total with four sets of data (~600 points) being drawn each.

I've already staggered the loading because it wouldn't go smoothly otherwise (I first init the graphjs instance and then load in the data a short timeout later) and the missing controller happens seemingly at random - skipping over the error, all tooltips work just fine a moment later, navigating away and back to the page, I cannot reproduce the error consistently.

Another weird thing is that when I add a breakpoint to where the error occurs, I can print out the content of controller just fine (it's not null), but then the error happens anyhow (it reports that controller IS null).

I first thought that the fix in this PR resolved the issue, but the error ended up cropping up again, so now I'm completely unsure what causes it.

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

Successfully merging this pull request may close these issues.

None yet

5 participants