From d1d4db05d5d2ecb7bcc337ea8d9f0957f0223ba3 Mon Sep 17 00:00:00 2001 From: hugoalh <32359235+hugoalh@users.noreply.github.com> Date: Fri, 24 Nov 2023 11:40:37 +0800 Subject: [PATCH] 20231124A --- exfetch.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exfetch.ts b/exfetch.ts index f6e58f2..2a3d4d0 100644 --- a/exfetch.ts +++ b/exfetch.ts @@ -553,12 +553,12 @@ export class ExFetch { if (new URL(input).protocol === "file:") { return fetch(input, init); } + const requestCacheOption: RequestCache | undefined = init?.cache; const requestCacheControl: boolean = this.#allowCache && new URL(input).protocol === "https:" && ( typeof init === "undefined" || typeof init.method === "undefined" || init.method.toUpperCase() === "GET" - ) && init?.cache !== "no-store"; - const requestCacheOption: RequestCache | undefined = init?.cache; + ) && requestCacheOption !== "no-store"; const requestFuzzy: Request = new Request(input, { ...init, cache: undefined,