fix(client): PWAでlangがnullになる現象の応急処置

#10202
This commit is contained in:
syuilo 2023-03-05 10:57:54 +09:00
parent f6c6ffaf64
commit 8e5e6f90cb

View file

@ -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);