Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/api-fetch/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,11 @@ function clearPreloadedData() {
* The default fetch handler, using `window.fetch`. Exposed so it can be
* restored after `setFetchHandler` overrides it.
*
* @param nextOptions The options for the fetch.
* @param options The options for the fetch.
*/
const defaultFetchHandler: FetchHandler = ( nextOptions ) => {
const { url, path, data, parse = true, ...remainingOptions } = nextOptions;
let { body, headers } = nextOptions;
const defaultFetchHandler: FetchHandler = ( options ) => {
const { url, path, data, parse = true, ...remainingOptions } = options;
let { body, headers } = options;

// Merge explicitly-provided headers with default values.
headers = { ...DEFAULT_HEADERS, ...headers };
Expand Down
Loading