Skip to content

Commit

Permalink
fix(GoogleMapsMixin): respond to update of googleMapsApi
Browse files Browse the repository at this point in the history
  • Loading branch information
tomchentw committed Nov 11, 2014
1 parent b6bc836 commit 3b0a0e0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/mixins/GoogleMapsMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ module.exports = {
};
},

componentWillReceiveProps (nextProps) {
if (!this.state.googleMapsApi && nextProps.googleMapsApi) {
this.setState({
googleMapsApi: nextProps.googleMapsApi
});
}
},

_get_map () {
return this.state.map;
},
Expand Down

0 comments on commit 3b0a0e0

Please sign in to comment.