From 8e5e6f90cb14109c6332158352a9329b791e2baa Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 5 Mar 2023 10:57:54 +0900 Subject: [PATCH] =?UTF-8?q?fix(client):=20PWA=E3=81=A7lang=E3=81=8Cnull?= =?UTF-8?q?=E3=81=AB=E3=81=AA=E3=82=8B=E7=8F=BE=E8=B1=A1=E3=81=AE=E5=BF=9C?= =?UTF-8?q?=E6=80=A5=E5=87=A6=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #10202 --- packages/backend/src/server/web/boot.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/backend/src/server/web/boot.js b/packages/backend/src/server/web/boot.js index c6cb25e43a..887a4c8e01 100644 --- a/packages/backend/src/server/web/boot.js +++ b/packages/backend/src/server/web/boot.js @@ -61,6 +61,10 @@ renderError('META_FETCH_V'); return; } + + // for https://github.com/misskey-dev/misskey/issues/10202 + if (lang == null || lang.toString == null || lang.toString() === 'null') lang = 'en-US'; + const localRes = await window.fetch(`/assets/locales/${lang}.${v}.json`); if (localRes.status === 200) { localStorage.setItem('lang', lang);