From ae84ef0f8d562d86dc242a6f19d703ea8700fa07 Mon Sep 17 00:00:00 2001 From: jemikanegara Date: Wed, 4 Dec 2024 21:11:21 +0800 Subject: [PATCH] disable cdn on worker --- utils/translation/getTranslationCacheFromCloudflare.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/translation/getTranslationCacheFromCloudflare.js b/utils/translation/getTranslationCacheFromCloudflare.js index e37a86a..4be69f1 100644 --- a/utils/translation/getTranslationCacheFromCloudflare.js +++ b/utils/translation/getTranslationCacheFromCloudflare.js @@ -4,7 +4,7 @@ const getTranslationCacheFromCDN = require("./getTranslationCacheFromCDN"); const getTranslationCacheFromKV = require("./getTranslationCacheFromKV"); async function getTranslationCacheFromCloudflare(window, language, apiKey) { - if (!isCompressionSupported(window)) return {}; + if (!isCompressionSupported(window) || window.isWorker) return {}; if (window?.cloudflareCache) return window?.cloudflareCache; const isUsingKV = true;