diff --git a/source/core/options.ts b/source/core/options.ts index f3aedef90..ad81a55e3 100644 --- a/source/core/options.ts +++ b/source/core/options.ts @@ -950,7 +950,7 @@ const cloneRaw = (raw: OptionsInit) => { }; const getHttp2TimeoutOption = (internals: typeof defaultInternals): number | undefined => { - const delays = [internals.timeout.socket, internals.timeout.connect, internals.timeout.lookup, internals.timeout.request, internals.timeout.secureConnect].filter(delay => typeof delay === 'number') as number[]; + const delays = [internals.timeout.socket, internals.timeout.connect, internals.timeout.lookup, internals.timeout.request, internals.timeout.secureConnect].filter(delay => typeof delay === 'number'); if (delays.length > 0) { return Math.min(...delays); diff --git a/source/core/utils/options-to-url.ts b/source/core/utils/options-to-url.ts index 44e66dd6c..e27450489 100644 --- a/source/core/utils/options-to-url.ts +++ b/source/core/utils/options-to-url.ts @@ -63,7 +63,7 @@ export default function optionsToUrl(origin: string, options: URLOptions): URL { for (const key of keys) { if (options[key]) { - url[key] = options[key]!.toString(); + url[key] = options[key].toString(); } }