We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents b6e2d85 + 7f1aed2 commit e38abe5Copy full SHA for e38abe5
1 file changed
app/component/embedded/EmbeddedSearch.js
@@ -245,8 +245,12 @@ const EmbeddedSearch = (props, context) => {
245
const executeSearch = () => {
246
const urlEnd = bikeOnly ? '/bike' : walkOnly ? '/walk' : '';
247
248
- // if origin or destination is missing, redirect to index page instead
249
- const isComplete = origin.address && destination.address;
+ // if origin or destination is missing and current location is not used,
+ // redirect to index page instead
250
+ const isComplete =
251
+ (origin.address && destination.address) ||
252
+ origin.type === 'CurrentLocation' ||
253
+ destination.type === 'CurrentLocation';
254
const targetUrl = isComplete
255
? buildURL([
256
lang,
0 commit comments