From 20fd58cb11dd2ec58bf0d44bad56952fce3363db Mon Sep 17 00:00:00 2001 From: Robert Nagy Date: Wed, 27 Nov 2024 13:48:35 +0100 Subject: [PATCH] fix: cache rm unused branch (#3889) --- lib/interceptor/cache.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/interceptor/cache.js b/lib/interceptor/cache.js index 703b87782ea..1b92a808f8f 100644 --- a/lib/interceptor/cache.js +++ b/lib/interceptor/cache.js @@ -195,9 +195,6 @@ function handleResult ( if (!result) { return handleUncachedResponse(dispatch, globalOpts, cacheKey, handler, opts, reqCacheControl) } - if (!result.body && opts.method !== 'HEAD') { - throw new Error('body is undefined but method isn\'t HEAD') - } const now = Date.now() if (now > result.deleteAt) {