Skip to content
Myr

Fix options.method being undefined in normalized options (#671)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Philipp Rudloff · committed by GitHub · parent 4a42701 · Browse files · 2 files+24 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+24 added−1 removed

  • tests:+23 added−0 removed
  • other:+1 added−1 removed

2 files+24 added−1 removed

modified:source/core/Ky.ts+1 added-1 removed
133 unmodified lines
134 afterResponse: [],135 },136 options.hooks,137 ),138 method: normalizeRequestMethod(options.method ?? (this._input as Request).method),138 method: normalizeRequestMethod(options.method ?? (this._input as Request).method ?? 'GET'),139 // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing140 prefixUrl: String(options.prefixUrl || ''),141 retry: normalizeRetryOptions(options.retry),142 throwHttpErrors: options.throwHttpErrors !== false,
228 unmodified lines
modified:test/methods.ts+23 added