Make sure "undefined" can be a default parameter value
Lower layers can consider null to be a valid value, when we'd rather they treat the value as not set.
This commit is contained in:
parent
c4eb4ddcfe
commit
d507d1415e
|
@ -123,7 +123,6 @@
|
||||||
// because Firefox < 53 has a bug w.r.t location.search
|
// because Firefox < 53 has a bug w.r.t location.search
|
||||||
const re = new RegExp('.*[?&]' + name + '=([^&#]*)'),
|
const re = new RegExp('.*[?&]' + name + '=([^&#]*)'),
|
||||||
match = document.location.href.match(re);
|
match = document.location.href.match(re);
|
||||||
if (typeof defaultValue === 'undefined') { defaultValue = null; }
|
|
||||||
|
|
||||||
if (match) {
|
if (match) {
|
||||||
// We have to decode the URL since want the cleartext value
|
// We have to decode the URL since want the cleartext value
|
||||||
|
|
Loading…
Reference in New Issue