From 3f60cf4b8fe4e713dad3d0a6648492fd87974704 Mon Sep 17 00:00:00 2001 From: Aaron Liu Date: Sun, 27 Apr 2025 10:26:48 +0800 Subject: [PATCH] fix(sw): remove i18n cache after SW registered --- src/App.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/App.tsx b/src/App.tsx index fe636ca..422088b 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -205,7 +205,9 @@ export const App = () => { needRefresh: [needRefresh, setNeedRefresh], updateServiceWorker, } = useRegisterSW({ - onRegisteredSW(swUrl, r) {}, + onRegisteredSW(swUrl, r) { + removeI18nCache(); + }, onRegisterError(error) { console.log("SW registration error", error); },