Skip to content

Commit 057725a

Browse files
committed
Merge branch 'dev'
2 parents 684198e + dcdcf98 commit 057725a

25 files changed

Lines changed: 61 additions & 61 deletions

app/sensors/GeoDistanceDropdown.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ export default class GeoDistanceDropdown extends Component {
136136

137137
axios.get(`https://maps.googleapis.com/maps/api/geocode/json?latlng=${this.locString}`)
138138
.then((res) => {
139-
if (res.data.results) {
139+
if (Array.isArray(res.data.results) && res.data.results.length) {
140140
const userLocation = res.data.results[0].formatted_address;
141141
this.setState({
142142
userLocation
@@ -214,7 +214,7 @@ export default class GeoDistanceDropdown extends Component {
214214
if (value && value !== "") {
215215
axios.get(`https://maps.googleapis.com/maps/api/geocode/json?address=${value}`)
216216
.then((res) => {
217-
if (res.data.results) {
217+
if (Array.isArray(res.data.results) && res.data.results.length) {
218218
const location = res.data.results[0].geometry.location;
219219
this.locString = `${location.lat}, ${location.lng}`;
220220
if (cb) {
@@ -394,7 +394,7 @@ export default class GeoDistanceDropdown extends Component {
394394
value: place.description
395395
});
396396
});
397-
if (this.state.userLocation.length && this.result.options[0].label !== "Use my current location") {
397+
if (this.state.userLocation && this.state.userLocation.length && this.result.options[0].label !== "Use my current location") {
398398
this.result.options.unshift({
399399
label: "Use my current location",
400400
value: this.state.userLocation

app/sensors/GeoDistanceSlider.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export default class GeoDistanceSlider extends Component {
120120

121121
axios.get(`https://maps.googleapis.com/maps/api/geocode/json?latlng=${this.locString}`)
122122
.then((res) => {
123-
if (res.data.results) {
123+
if (Array.isArray(res.data.results) && res.data.results.length) {
124124
const userLocation = res.data.results[0].formatted_address;
125125
this.setState({
126126
userLocation
@@ -197,7 +197,7 @@ export default class GeoDistanceSlider extends Component {
197197
if (value && value !== "") {
198198
axios.get(`https://maps.googleapis.com/maps/api/geocode/json?address=${value}`)
199199
.then((res) => {
200-
if (res.data.results) {
200+
if (Array.isArray(res.data.results) && res.data.results.length) {
201201
const location = res.data.results[0].geometry.location;
202202
this.locString = `${location.lat}, ${location.lng}`;
203203
if (cb) {

dist/CustomQuery.bundle.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/GeoDistanceDropdown.bundle.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/GeoDistanceSlider.bundle.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/PlacesSearch.bundle.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/direction.bundle.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/earthquake.bundle.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/events.bundle.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/heatmap.bundle.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)