Skip to content

Commit 6f4d3fc

Browse files
committed
Fix psgdpr menu URL query separator
1 parent 8766470 commit 6f4d3fc

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

views/js/menu.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@
1919
$(window).ready(function () {
2020
moduleAdminLink = moduleAdminLink.replace(/\amp;/g, "");
2121

22+
function addQueryParameter(url, parameter) {
23+
var separator = url.indexOf("?") === -1 ? "?" : "&";
24+
25+
return url + separator + parameter;
26+
}
27+
2228
window.vMenu = new Vue({
2329
el: "#psgdpr-menu",
2430
data: {
@@ -27,7 +33,7 @@ $(window).ready(function () {
2733
methods: {
2834
makeActive: function (item) {
2935
this.selectedTabName = item;
30-
window.history.pushState({}, "", moduleAdminLink + "&page=" + item);
36+
window.history.pushState({}, "", addQueryParameter(moduleAdminLink, "page=" + item));
3137
},
3238
isActive: function (item) {
3339
if (this.selectedTabName == item) {

0 commit comments

Comments
 (0)