diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-20 12:40:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-20 12:40:42 +0300 |
commit | ee664acb356f8123f4f6b00b73c1e1cf0866c7fb (patch) | |
tree | f8479f94a28f66654c6a4f6fb99bad6b4e86a40e /app/assets/javascripts/main.js | |
parent | 62f7d5c5b69180e82ae8196b7b429eeffc8e7b4f (diff) |
Add latest changes from gitlab-org/gitlab@15-5-stable-eev15.5.0-rc42
Diffstat (limited to 'app/assets/javascripts/main.js')
-rw-r--r-- | app/assets/javascripts/main.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/app/assets/javascripts/main.js b/app/assets/javascripts/main.js index c16ed68096d..8e4ebd510aa 100644 --- a/app/assets/javascripts/main.js +++ b/app/assets/javascripts/main.js @@ -21,7 +21,7 @@ import initTodoToggle from './header'; import initLayoutNav from './layout_nav'; import { handleLocationHash, addSelectOnFocusBehaviour } from './lib/utils/common_utils'; import { localTimeAgo } from './lib/utils/datetime/timeago_utility'; -import { getLocationHash, visitUrl } from './lib/utils/url_utility'; +import { getLocationHash, visitUrl, mergeUrlParams } from './lib/utils/url_utility'; // everything else import initFeatureHighlight from './feature_highlight'; @@ -250,11 +250,10 @@ $('form.filter-form').on('submit', function filterFormSubmitCallback(event) { const link = document.createElement('a'); link.href = this.action; - const action = `${this.action}${link.search === '' ? '?' : '&'}`; + const action = mergeUrlParams(Object.fromEntries(new FormData(this)), this.action); event.preventDefault(); - // eslint-disable-next-line no-jquery/no-serialize - visitUrl(`${action}${$(this).serialize()}`); + visitUrl(action); }); const flashContainer = document.querySelector('.flash-container'); |