diff --git a/app/components/station-detail/index.js b/app/components/station-detail/index.js index d21621b..6dcccfd 100644 --- a/app/components/station-detail/index.js +++ b/app/components/station-detail/index.js @@ -49,11 +49,16 @@ const StationDetail = class extends Component { } requestLoctionInformation() { - if (this.props.location) { - this.props.fetchTideData(this.props.location) - this.props.findCityName(this.props.location) + const { location, fetchTideData, findCityName } = this.props + + if (location) { + fetchTideData(location) + findCityName(location) } else { - this.findCurrentLocation() + fetchLocation().then((location) => { + fetchTideData(location) + findCityName(location) + }) } }