Don't put 'undefined' in the URL
This commit is contained in:
parent
f63002b325
commit
b8f33f0467
1 changed files with 6 additions and 0 deletions
|
@ -44,9 +44,15 @@ export class QueryParameters {
|
||||||
if (QueryParameters.knownSources[key] === undefined || QueryParameters.knownSources[key].data === undefined) {
|
if (QueryParameters.knownSources[key] === undefined || QueryParameters.knownSources[key].data === undefined) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (QueryParameters.knownSources[key].data === undefined) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (QueryParameters.knownSources[key].data == QueryParameters.defaults[key]) {
|
if (QueryParameters.knownSources[key].data == QueryParameters.defaults[key]) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
parts.push(encodeURIComponent(key) + "=" + encodeURIComponent(QueryParameters.knownSources[key].data))
|
parts.push(encodeURIComponent(key) + "=" + encodeURIComponent(QueryParameters.knownSources[key].data))
|
||||||
}
|
}
|
||||||
history.replaceState(null, "", "?" + parts.join("&"));
|
history.replaceState(null, "", "?" + parts.join("&"));
|
||||||
|
|
Loading…
Reference in a new issue