From fa7c813b39dd4ff9240ba9dc931597d10767885e Mon Sep 17 00:00:00 2001 From: Kimmo Puputti Date: Thu, 22 Mar 2018 11:17:12 +0200 Subject: [PATCH] Fix google lib check for server rendering --- src/components/Map/Map.js | 2 +- src/components/SearchMap/SearchMap.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Map/Map.js b/src/components/Map/Map.js index 60250982..942ef90d 100644 --- a/src/components/Map/Map.js +++ b/src/components/Map/Map.js @@ -81,7 +81,7 @@ export class Map extends Component { const location = coordinatesConfig.fuzzy ? obfuscatedCenter : center; const centerLocationForGoogleMap = { lat: location.lat, lng: location.lng }; - const isMapsLibLoaded = window.google && window.google.maps; + const isMapsLibLoaded = typeof window !== 'undefined' && window.google && window.google.maps; return isMapsLibLoaded ? (