Skip to content

Commit

Permalink
fix(terrapi): fix if all types is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
mbarbeau committed Dec 12, 2019
1 parent 881270c commit 28f5c51
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/geo/src/lib/search/shared/sources/icherche.ts
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,9 @@ export class IChercheReverseSearchSource extends SearchSource
options?: ReverseSearchOptions
): Observable<SearchResult<Feature>[]> {
const params = this.computeRequestParams(lonLat, options || {});
if (!params.get('type').length) {
return of([]);
}
return this.http.get(`${this.searchUrl}/locate`, { params }).pipe(
map((response: IChercheReverseResponse) => {
return this.extractResults(response);
Expand Down

0 comments on commit 28f5c51

Please sign in to comment.