Skip to content

Commit

Permalink
Merge 4be5613 into 81fe307
Browse files Browse the repository at this point in the history
  • Loading branch information
yen-tt committed Feb 14, 2022
2 parents 81fe307 + 4be5613 commit b9e4275
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/ui/components/search/searchcomponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -581,10 +581,7 @@ export default class SearchComponent extends Component {
promptForLocation (query) {
if (this._promptForLocation) {
return this.fetchQueryIntents(query)
.then(
queryIntents => queryIntents.includes('NEAR_ME'),
error => Promise.reject(new Error('Failed to fetch query intents.', { cause: error }))
)
.then(queryIntents => queryIntents.includes('NEAR_ME'))
.then(queryHasNearMeIntent => {
if (queryHasNearMeIntent && !this.core.storage.get(StorageKeys.GEOLOCATION)) {
return new Promise((resolve, reject) =>
Expand All @@ -607,8 +604,7 @@ export default class SearchComponent extends Component {
this._geolocationOptions)
);
}
})
.catch(error => console.warn('Unable to determine user\'s location.', error));
});
} else {
return Promise.resolve();
}
Expand Down

0 comments on commit b9e4275

Please sign in to comment.