diff options
Diffstat (limited to 'web/app/view/dialog/LoginController.js')
-rw-r--r-- | web/app/view/dialog/LoginController.js | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/web/app/view/dialog/LoginController.js b/web/app/view/dialog/LoginController.js index 1b5cd072..c25d9a83 100644 --- a/web/app/view/dialog/LoginController.js +++ b/web/app/view/dialog/LoginController.js @@ -86,14 +86,12 @@ Ext.define('Traccar.view.dialog.LoginController', { prefix = url.substring(0, url.indexOf(paramName)); suffix = url.substring(url.indexOf(paramName)); suffix = suffix.substring(suffix.indexOf('=') + 1); - suffix = (suffix.indexOf('&') >= 0) ? suffix.substring(suffix.indexOf('&')) : ''; + suffix = suffix.indexOf('&') >= 0 ? suffix.substring(suffix.indexOf('&')) : ''; url = prefix + paramName + '=' + paramValue + suffix; + } else if (url.indexOf('?') < 0) { + url += '?' + paramName + '=' + paramValue; } else { - if (url.indexOf('?') < 0) { - url += '?' + paramName + '=' + paramValue; - } else { - url += '&' + paramName + '=' + paramValue; - } + url += '&' + paramName + '=' + paramValue; } window.location.href = url; }, |