()
| 46 | } |
| 47 | |
| 48 | componentDidMount() { |
| 49 | const { loadingState } = this.state |
| 50 | if (loadingState !== LOADING_STATE_NONE || !canUseDOM) { |
| 51 | return |
| 52 | } |
| 53 | this.setState({ |
| 54 | loadingState: LOADING_STATE_BEGIN, |
| 55 | }) |
| 56 | // Don't load scriptjs as a dependency since we do not want this module be used on server side. |
| 57 | // eslint-disable-next-line global-require |
| 58 | const scriptjs = require(`scriptjs`) |
| 59 | const { googleMapURL } = this.props |
| 60 | scriptjs(googleMapURL, this.handleLoaded) |
| 61 | } |
| 62 | |
| 63 | componentWillUnmount() { |
| 64 | this.isUnmounted = true |
nothing calls this directly
no outgoing calls
no test coverage detected