mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
fix: remove called to deprecated url.resolve (#106501)
* fix: remove called to deprecated url.resolve * simplify joining of URL parts
This commit is contained in:
parent
0bb761de32
commit
0c4c662ce7
1 changed files with 2 additions and 3 deletions
|
@ -7,7 +7,6 @@
|
|||
*/
|
||||
|
||||
import { pick, throttle, cloneDeep } from 'lodash';
|
||||
import { resolve as resolveUrl } from 'url';
|
||||
import type { PublicMethodsOf } from '@kbn/utility-types';
|
||||
|
||||
import {
|
||||
|
@ -121,7 +120,7 @@ interface BatchQueueEntry {
|
|||
reject: (reason?: any) => void;
|
||||
}
|
||||
|
||||
const join = (...uriComponents: Array<string | undefined>) =>
|
||||
const joinUriComponents = (...uriComponents: Array<string | undefined>) =>
|
||||
uriComponents
|
||||
.filter((comp): comp is string => Boolean(comp))
|
||||
.map(encodeURIComponent)
|
||||
|
@ -511,7 +510,7 @@ export class SavedObjectsClient {
|
|||
}
|
||||
|
||||
private getPath(path: Array<string | undefined>): string {
|
||||
return resolveUrl(API_BASE_URL, join(...path));
|
||||
return API_BASE_URL + joinUriComponents(...path);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue