From 5af9e11f4311f1e3d1116bc7138e6044c72fc794 Mon Sep 17 00:00:00 2001 From: jwinterm Date: Thu, 19 Mar 2026 14:49:47 -0400 Subject: [PATCH] fix infinite reload loop for English browsers --- js/translations/traduction.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/js/translations/traduction.js b/js/translations/traduction.js index ac170f7..2abcf95 100644 --- a/js/translations/traduction.js +++ b/js/translations/traduction.js @@ -1,7 +1,9 @@ async function translate(lang) { if (lang == 'en-US' || lang == 'en') { - localStorage.removeItem('wowLang'); - location.reload(); + if (localStorage.getItem('wowLang')) { + localStorage.removeItem('wowLang'); + location.reload(); + } return; } if (lang == "it" || lang == "it-CH") lang = "it-IT";