aboutsummaryrefslogtreecommitdiff
path: root/web/app/controller
diff options
context:
space:
mode:
Diffstat (limited to 'web/app/controller')
-rw-r--r--web/app/controller/Root.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/web/app/controller/Root.js b/web/app/controller/Root.js
index 87c4cf5e..f95dcc67 100644
--- a/web/app/controller/Root.js
+++ b/web/app/controller/Root.js
@@ -116,7 +116,11 @@ Ext.define('Traccar.controller.Root', {
removeUrlParameter: function (param) {
var params = Ext.Object.fromQueryString(window.location.search);
delete params[param];
- window.history.pushState(null, null, window.location.pathname + '?' + Ext.Object.toQueryString(params));
+ if (Ext.Object.isEmpty(params)) {
+ window.history.pushState(null, null, window.location.pathname);
+ } else {
+ window.history.pushState(null, null, window.location.pathname + '?' + Ext.Object.toQueryString(params));
+ }
},
asyncUpdate: function (first) {