mirror of
https://github.com/google-map-react/google-map-react.git
synced 2025-12-08 18:26:32 +00:00
notify call back of load failure (#479)
When the google fails to load due to no internet, the call back should be notified so that appropriate UI can be shown
This commit is contained in:
parent
0db8020122
commit
7814901c64
@ -760,6 +760,8 @@ export default class GoogleMap extends Component {
|
||||
});
|
||||
})
|
||||
.catch(e => {
|
||||
// notify callback of load failure
|
||||
this._onGoogleApiLoaded({ map: null, maps: null });
|
||||
console.error(e); // eslint-disable-line no-console
|
||||
throw e;
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user