diff --git a/source/core/Ky.ts b/source/core/Ky.ts index 673e7e85..2b816bbd 100644 --- a/source/core/Ky.ts +++ b/source/core/Ky.ts @@ -295,7 +295,7 @@ export class Ky { } } - const nonRequestOptions = findUnknownOptions(this.request, this._options); + const nonRequestOptions = findUnknownOptions(this._options); if (this._options.timeout === false) { return this._options.fetch(this.request.clone(), nonRequestOptions); diff --git a/source/utils/options.ts b/source/utils/options.ts index 4968f2bf..272f3f06 100644 --- a/source/utils/options.ts +++ b/source/utils/options.ts @@ -1,13 +1,12 @@ import {kyOptionKeys, requestOptionsRegistry} from '../core/constants.js'; export const findUnknownOptions = ( - request: Request, options: Record, ): Record => { const unknownOptions: Record = {}; for (const key in options) { - if (!(key in requestOptionsRegistry) && !(key in kyOptionKeys) && !(key in request)) { + if (!(key in requestOptionsRegistry) && !(key in kyOptionKeys)) { unknownOptions[key] = options[key]; } }