mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 20:33:32 +08:00
fix(util): ignore empty query param in getQueryString
This commit is contained in:
@ -163,7 +163,7 @@ export function getQuerystring(url: string): any {
|
|||||||
const startIndex = url.indexOf('?');
|
const startIndex = url.indexOf('?');
|
||||||
if (startIndex !== -1) {
|
if (startIndex !== -1) {
|
||||||
const queries = url.slice(startIndex + 1).split('&');
|
const queries = url.slice(startIndex + 1).split('&');
|
||||||
queries.forEach((param) => {
|
queries.filter((param) => { return param.indexOf('=') > 0; }).forEach((param) => {
|
||||||
var split = param.split('=');
|
var split = param.split('=');
|
||||||
queryParams[split[0].toLowerCase()] = split[1].split('#')[0];
|
queryParams[split[0].toLowerCase()] = split[1].split('#')[0];
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user