Skip to content

Conversation

@mauriciosfriso
Copy link

@mauriciosfriso mauriciosfriso commented Mar 22, 2018

When there isn´t a internet connection, the app crash.

@Simek
Copy link
Contributor

Simek commented Apr 12, 2018

I think we should check also if maps in google is available.
Rewriting check to if(!google || !google.maps) should be enough.

@mauriciosfriso
Copy link
Author

I check your code and does't works. I getting: google is not defined.
if you will check remember delete browser cache

@Simek
Copy link
Contributor

Simek commented Apr 12, 2018

@mauriciosfriso Sorry for wrong example, my mistake, conditions in my example should be reversed.
if(google && google.maps).

@mauriciosfriso
Copy link
Author

mauriciosfriso commented Apr 12, 2018

@Simek I see your mistake, but anyway it's not works. I keep getting:

google is not defined

therefore I check the google's type

sorry for my English

@Simek
Copy link
Contributor

Simek commented Apr 13, 2018

I've dig a little bit into this problem. Seems that google is set to be an identifier until script loads. This causes !google check to throw "undefined" error so your code comparing type is correct way to check this. And don't worry about your english. It's fine.

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.

2 participants