File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -46,15 +46,16 @@ export function withGoogleMap(BaseComponent) {
4646 }
4747
4848 handleComponentMount ( node ) {
49- if ( this . state . map || node === null ) {
50- return
51- }
5249 warning (
5350 `undefined` !== typeof google ,
5451 `Make sure you've put a <script> tag in your <head> element to load Google Maps JavaScript API v3.
5552 If you're looking for built-in support to load it for you, use the "async/ScriptjsLoader" instead.
5653 See https://github.com/tomchentw/react-google-maps/pull/168`
5754 )
55+
56+ if ( this . state . map || node === null || google == null ) {
57+ return
58+ }
5859 // https://developers.google.com/maps/documentation/javascript/3.exp/reference#Map
5960 const map = new google . maps . Map ( node )
6061 this . setState ( { map } )
You can’t perform that action at this time.
0 commit comments