diff --git a/frontend/src/pages/Batches.vue b/frontend/src/pages/Batches.vue index 788f1f4f..4a3a05b9 100644 --- a/frontend/src/pages/Batches.vue +++ b/frontend/src/pages/Batches.vue @@ -251,7 +251,12 @@ const setQueryParams = () => { } }) - history.replaceState({}, '', `${location.pathname}?${queries.toString()}`) + let queryString = ''; + if (queries.toString()) { + queryString = `?${queries.toString()}` + } + + history.replaceState({}, '', `${location.pathname}${queryString}`) } const updateCategories = (data) => { diff --git a/frontend/src/pages/Courses.vue b/frontend/src/pages/Courses.vue index 634eeb6e..51cf56aa 100644 --- a/frontend/src/pages/Courses.vue +++ b/frontend/src/pages/Courses.vue @@ -256,7 +256,13 @@ const setQueryParams = () => { } }) - history.replaceState({}, '', `${location.pathname}?${queries.toString()}`) + + let queryString = ''; + if (queries.toString()) { + queryString = `?${queries.toString()}` + } + + history.replaceState({}, '', `${location.pathname}${queryString}`) } const updateCategories = (data) => {