aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/api/components.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-web/src/main/js/api/components.js')
-rw-r--r--server/sonar-web/src/main/js/api/components.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/server/sonar-web/src/main/js/api/components.js b/server/sonar-web/src/main/js/api/components.js
index 9552a20dfce..867100c4fae 100644
--- a/server/sonar-web/src/main/js/api/components.js
+++ b/server/sonar-web/src/main/js/api/components.js
@@ -192,11 +192,14 @@ export type SuggestionsResponse = {
};
export const getSuggestions = (
- query: string,
+ query?: string,
recentlyBrowsed?: Array<string>,
more?: string
): Promise<SuggestionsResponse> => {
- const data: Object = { s: query };
+ const data: Object = {};
+ if (query) {
+ data.s = query;
+ }
if (recentlyBrowsed) {
data.recentlyBrowsed = recentlyBrowsed.join();
}