diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-12-09 09:49:19 +1300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-09 09:49:19 +1300 |
commit | 266604f7a1e59fc74c400ef22915106abfa4b03a (patch) | |
tree | 5f00294602841033654ca741f2879a8c03216920 /web/app/controller/Root.js | |
parent | 06c4ae96db8805cb3468a3028d652a1f8a0823b9 (diff) | |
parent | b90439d05207c473bb5b8187075be30d8bfbc541 (diff) | |
download | etbsa-traccar-web-266604f7a1e59fc74c400ef22915106abfa4b03a.tar.gz etbsa-traccar-web-266604f7a1e59fc74c400ef22915106abfa4b03a.tar.bz2 etbsa-traccar-web-266604f7a1e59fc74c400ef22915106abfa4b03a.zip |
Merge pull request #352 from Abyss777/fix_parameter_removing
Fix parameter removing if it is single
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) { |