Fix search "all in GitLab" not working with relative URLs

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/53259
This commit is contained in:
Stan Hu 2018-10-27 21:11:55 -07:00
parent e997b22df5
commit 01dbf70687
2 changed files with 7 additions and 2 deletions

View file

@ -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()}`,
});
}
}

View file

@ -0,0 +1,5 @@
---
title: Fix search "all in GitLab" not working with relative URLs
merge_request: 22644
author:
type: fixed