mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[modifyUrl] only consume the meaningful keys (#12616)
This commit is contained in:
parent
c79e22386c
commit
7610d25aa0
1 changed files with 11 additions and 2 deletions
|
@ -54,8 +54,17 @@ export function modifyUrl(url, block) {
|
|||
};
|
||||
|
||||
// the block modifies the meaningfulParts object, or returns a new one
|
||||
const modifications = block(meaningfulParts) || meaningfulParts;
|
||||
const modifiedParts = block(meaningfulParts) || meaningfulParts;
|
||||
|
||||
// format the modified/replaced meaningfulParts back into a url
|
||||
return formatUrl(modifications);
|
||||
return formatUrl({
|
||||
protocol: modifiedParts.protocol,
|
||||
slashes: modifiedParts.slashes,
|
||||
auth: modifiedParts.auth,
|
||||
hostname: modifiedParts.hostname,
|
||||
port: modifiedParts.port,
|
||||
pathname: modifiedParts.pathname,
|
||||
query: modifiedParts.query,
|
||||
hash: modifiedParts.hash,
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue