Fix - do not try to process an empty common string, make more valid urls

Before: index.php?&server=1
After: index.php?server=1

Using move and go to database feature

Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
William Desportes 2021-07-15 01:43:39 +02:00
parent f490ee8867
commit c81bb0ad39
No known key found for this signature in database
GPG Key ID: 90A0EF1B8251A889

View File

@ -88,7 +88,7 @@ var CommonParams = (function () {
var sep = (typeof separator !== 'undefined') ? separator : '?';
var common = this.get('common_query');
var argsep = CommonParams.get('arg_separator');
if (typeof common === 'string') {
if (typeof common === 'string' && common.length > 0) {
// If the last char is the separator, do not add it
// Else add it
common = common.substr(common.length - 1, common.length) === argsep ? common : common + argsep;