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

Ensure dispatcher and associated functions are defined before calling them #1

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

Conversation

russell-knight
Copy link
Collaborator

@russell-knight russell-knight commented Jun 19, 2024

When we upgraded to React 18 we had to create a fork of the google-map-react library that we used as the original one isn't well maintained any longer. Since that time we have been seeing some Sentry errors relating to this library appearing.

  • The errors seem to be exclusively coming from Apple devices, which makes reproducing them impossible for myself
  • The errors indicate that either the dispatcher property or the getChildren() function that exists on dispatcher are undefined

In this PR I've added a check to ensure that both of these exist before calling getChildren(). Similarly I've added a check for the subsequent getUpdateCounter() function that is called.

I'm not entirely sure if this approach will work.

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.

1 participant