Add guard around mapDom event listener by bignimbus · Pull Request #594 · google-map-react/google-map-react

Fixes an issue where, even if the end user has a proper google maps API
mock, the GoogleMaps component will throw an error when in a test
env. ReactDOM.findDOMNode(this.googleMapDom_) returns null.

This commit wraps the subsequent addEventListener call in an if block,
ensuring that an empty DOM doesn't add complications to test suites

Thank you for your consideration and your hard work on this great library!