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(src/withGoogleMap): crash when google is not defined #867

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

Conversation

ToLi91
Copy link

@ToLi91 ToLi91 commented Jul 13, 2018

PLEASE CHECK "Allow edits from maintainers"

help

FOLLOW "Conventional Commits Specification" FOR ALL COMMITS

https://conventionalcommits.org/

@ToLi91
Copy link
Author

ToLi91 commented Jul 13, 2018

This will fix so a whole site does not crash when the google-maps script is not loaded, making window.google undefined.

Fix for Issues: #745 and #797

@Piemontez
Copy link

Piemontez commented Jul 17, 2018

The withGoogleMap function doesn't prevent "google is not loaded" error.

I proposed a solution to this in
https://github.com/Piemontez/react-google-maps/blob/patch-1/src/withGoogleMap.jsx : 59.

In my case, my system operates offline too and this crash is right.

@ToLi91
Copy link
Author

ToLi91 commented Jul 22, 2018

That will only work if the variable google has been defined to a falsely state. I have the problem where google is not yet defined due to that I did not allow the google maps js to load (NoScript).

I think both of these solutions are very good improvements which solves two different problems.

@mauriciosfriso
Copy link

It seems to be the same problem that #811. There it was solved

@ToLi91
Copy link
Author

ToLi91 commented Aug 13, 2018

@mauriciosfriso yes this is very true!

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.

3 participants