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:
Pierre Ossman 2019-12-25 12:10:21 +01:00
parent c4eb4ddcfe
commit d507d1415e
1 changed files with 0 additions and 1 deletions

View File

@ -123,7 +123,6 @@
// because Firefox < 53 has a bug w.r.t location.search
const re = new RegExp('.*[?&]' + name + '=([^&#]*)'),
match = document.location.href.match(re);
if (typeof defaultValue === 'undefined') { defaultValue = null; }
if (match) {
// We have to decode the URL since want the cleartext value