diff options
Diffstat (limited to 'web/app/controller/Root.js')
-rw-r--r-- | web/app/controller/Root.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/web/app/controller/Root.js b/web/app/controller/Root.js index 87c4cf5..f95dcc6 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) { |