Return '' instead of 'null'
This commit changes the behavior of getURLParameter(name) to return an empty string when the parameter is not set or has empty value. Before it returned 'null' as string.
This commit is contained in:
parent
fcc91cbc49
commit
1e9d523046
|
@ -1723,7 +1723,7 @@ function formatDate(timestamp){
|
||||||
*/
|
*/
|
||||||
function getURLParameter(name) {
|
function getURLParameter(name) {
|
||||||
return decodeURI(
|
return decodeURI(
|
||||||
(RegExp(name + '=' + '(.+?)(&|$)').exec(location.search) || [, null])[1]
|
(RegExp(name + '=' + '(.+?)(&|$)').exec(location.search) || [, ''])[1]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue