diff --git a/src/core/public/http/fetch.ts b/src/core/public/http/fetch.ts index b3d5c204c3ca..7f87e5e7041f 100644 --- a/src/core/public/http/fetch.ts +++ b/src/core/public/http/fetch.ts @@ -148,12 +148,11 @@ export class Fetch { }), }; - const prependOptions = options.withoutClientBasePath - ? { withoutClientBasePath: options.withoutClientBasePath } - : undefined; const url = format({ pathname: shouldPrependBasePath - ? this.params.basePath.prepend(options.path, prependOptions) + ? this.params.basePath.prepend(options.path, { + withoutClientBasePath: options.withoutClientBasePath, + }) : options.path, query: removedUndefined(query), });