From 01dbf70687f08e50db34fc1fd323b449d5323e32 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Sat, 27 Oct 2018 21:11:55 -0700 Subject: Fix search "all in GitLab" not working with relative URLs Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/53259 --- app/assets/javascripts/search_autocomplete.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/assets/javascripts') diff --git a/app/assets/javascripts/search_autocomplete.js b/app/assets/javascripts/search_autocomplete.js index 7bde4860973..ad4f5320ff8 100644 --- a/app/assets/javascripts/search_autocomplete.js +++ b/app/assets/javascripts/search_autocomplete.js @@ -226,7 +226,7 @@ export class SearchAutocomplete { icon, text: term, template: s__('SearchAutocomplete|in all GitLab'), - url: `/search?search=${term}`, + url: `${gon.relative_url_root}/search?search=${term}`, }); if (template) { @@ -234,7 +234,7 @@ export class SearchAutocomplete { icon, text: term, template, - url: `/search?search=${term}&project_id=${this.projectInputEl.val()}&group_id=${this.groupInputEl.val()}`, + url: `${gon.relative_url_root}/search?search=${term}&project_id=${this.projectInputEl.val()}&group_id=${this.groupInputEl.val()}`, }); } } -- cgit v1.2.1