Skip to content

Commit

Permalink
fix(Geosuggest): initialise Google Maps in componentWillMount instead…
Browse files Browse the repository at this point in the history
… of componentDidMount

fixes #130
  • Loading branch information
Caerostris committed May 23, 2016
1 parent 9c3c6d2 commit 2f32642
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Geosuggest.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,7 @@ class Geosuggest extends React.Component {
* Google api sdk object will be obtained and cached as a instance property.
* Necessary objects of google api will also be determined and saved.
*/
componentDidMount() {
this.setState({userInput: this.props.initialValue});

componentWillMount() {
var googleMaps = this.props.googleMaps ||
(window.google && // eslint-disable-line no-extra-parens
window.google.maps) ||
Expand Down

0 comments on commit 2f32642

Please sign in to comment.