config: minor.
This commit is contained in:
parent
459803aaec
commit
5947647ebc
|
@ -986,7 +986,7 @@ class Config {
|
|||
return {};
|
||||
}
|
||||
|
||||
return this.parseForm(query, this.query);
|
||||
return this.parseForm(query, '?', this.query);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1006,26 +1006,23 @@ class Config {
|
|||
return {};
|
||||
}
|
||||
|
||||
return this.parseForm(hash, this.hash);
|
||||
return this.parseForm(hash, '#', this.hash);
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse form-urlencoded variables.
|
||||
* @private
|
||||
* @param {String} query
|
||||
* @param {String} ch
|
||||
* @param {Object} map
|
||||
*/
|
||||
|
||||
parseForm(query, map) {
|
||||
parseForm(query, ch, map) {
|
||||
assert(typeof query === 'string');
|
||||
|
||||
if (query.length === 0)
|
||||
return;
|
||||
|
||||
let ch = '?';
|
||||
|
||||
if (map === this.hash)
|
||||
ch = '#';
|
||||
|
||||
if (query[0] === ch)
|
||||
query = query.substring(1);
|
||||
|
||||
|
|
Loading…
Reference in New Issue