From 2e0c60b045c1d5ed7e06f4c5bc2efc88073a55d8 Mon Sep 17 00:00:00 2001 From: Tom Chen Date: Thu, 3 Dec 2015 21:08:47 +0800 Subject: [PATCH] feat(GoogleMap): add warning for undefined google object * Closes #142 --- src/creators/GoogleMapHolder.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/creators/GoogleMapHolder.js b/src/creators/GoogleMapHolder.js index 9ebab44e..ffe578b2 100644 --- a/src/creators/GoogleMapHolder.js +++ b/src/creators/GoogleMapHolder.js @@ -5,6 +5,10 @@ import { Children, } from "react"; +import { + default as warning, +} from "warning"; + import {default as GoogleMapEventList} from "../eventLists/GoogleMapEventList"; import {default as eventHandlerCreator} from "../utils/eventHandlerCreator"; import {default as defaultPropsCreator} from "../utils/defaultPropsCreator"; @@ -56,6 +60,11 @@ export default class GoogleMapHolder extends Component { } static _createMap (domEl, mapProps) { + warning(`undefined` !== typeof google, +`Make sure you've put a