Skip to content

Commit

Permalink
fix(core/search): dont throw when SETTINGS.defaultProviders is null-i…
Browse files Browse the repository at this point in the history
…sh (#5093)
  • Loading branch information
Scott Bloch-Wehba-Seaward committed Mar 29, 2018
1 parent 720f07d commit e4f5f3e
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ export class InfrastructureSearchServiceV2 {
return Observable.from(this.EMPTY_RESULTS);
}

const params = { ...apiParams, cloudProvider: SETTINGS.defaultProviders[0] };
const params = { ...apiParams };
if (SETTINGS.defaultProviders && SETTINGS.defaultProviders.length > 0) {
params.cloudProvider = SETTINGS.defaultProviders[0];
}
const types = searchResultTypeRegistry.getAll();
const otherResults$ = new Subject<ISearchResultSet>();

Expand Down

0 comments on commit e4f5f3e

Please sign in to comment.