From f4518b6eb7cab8f7fa985abe683af2478ec52070 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Sun, 24 Apr 2022 09:19:36 +0200 Subject: [PATCH] fix: make index-fetch spec-compliant Refs: https://github.com/nodejs/undici/commit/3e267ece5f3a6b9b4cd6562f885a6884e3926937 --- index-fetch.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index-fetch.js b/index-fetch.js index 97e2fbb9ad5..aaf70af701d 100644 --- a/index-fetch.js +++ b/index-fetch.js @@ -5,8 +5,8 @@ const Agent = require('./lib/agent') const globalDispatcher = new Agent() const fetchImpl = require('./lib/fetch') -module.exports.fetch = async function fetch (resource, init) { - return fetchImpl.call(globalDispatcher, resource, init) +module.exports.fetch = async function fetch (resource) { + return fetchImpl.apply(globalDispatcher, arguments) } module.exports.FormData = require('./lib/fetch/formdata').FormData module.exports.Headers = require('./lib/fetch/headers').Headers