From 985dcb15e8a07e23e1bf639a95625c7371a7e34f Mon Sep 17 00:00:00 2001 From: ayoayco Date: Sun, 18 Aug 2024 19:49:35 +0200 Subject: [PATCH] feat: don't abort signal on network fetch --- src/sw.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sw.mjs b/src/sw.mjs index 07fb87f..ad4cd9a 100644 --- a/src/sw.mjs +++ b/src/sw.mjs @@ -82,7 +82,7 @@ const cacheAndRevalidate = async ({ request, preloadResponsePromise, fallbackUrl try { // Try to get the resource from the network for 5 seconds - const responseFromNetwork = await fetch(request.clone(), { signal: AbortSignal.timeout(5000) }); + const responseFromNetwork = await fetch(request.clone()); // response may be used only once // we need to save clone to put one copy in cache // and serve second one