From 654ed0c1e92a4d020e5ad799079d898f28c992c4 Mon Sep 17 00:00:00 2001 From: CondorHero <47056890+condorheroblog@users.noreply.github.com> Date: Sun, 14 Jan 2024 20:31:58 +0800 Subject: [PATCH] fix: `isFetch` is undefined when using new Request for Fetch request https://github.com/jpillora/xhook/issues/174 --- src/patch/fetch.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/patch/fetch.ts b/src/patch/fetch.ts index 1af2240..82cd4fc 100644 --- a/src/patch/fetch.ts +++ b/src/patch/fetch.ts @@ -66,6 +66,7 @@ const Xhook: typeof fetch = function (input, init = { headers: {} }) { ...init, headers: prevHeaders, acceptedRequest: true, + isFetch: true, }; } else { options.url = input;