aboutsummaryrefslogtreecommitdiff
path: root/web/app/controller
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2016-12-08 17:32:46 +0500
committerAbyss777 <abyss@fox5.ru>2016-12-08 17:32:46 +0500
commitb90439d05207c473bb5b8187075be30d8bfbc541 (patch)
tree5f00294602841033654ca741f2879a8c03216920 /web/app/controller
parent06c4ae96db8805cb3468a3028d652a1f8a0823b9 (diff)
downloadtrackermap-web-b90439d05207c473bb5b8187075be30d8bfbc541.tar.gz
trackermap-web-b90439d05207c473bb5b8187075be30d8bfbc541.tar.bz2
trackermap-web-b90439d05207c473bb5b8187075be30d8bfbc541.zip
Fix parameter removing if it is single
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) {