summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/main.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/main.js')
-rw-r--r--app/assets/javascripts/main.js7
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');