Skip to content

Commit

Permalink
fix(client): PWAでlangがnullになる現象の応急処置
Browse files Browse the repository at this point in the history
  • Loading branch information
syuilo committed Mar 5, 2023
1 parent f6c6ffa commit 8e5e6f9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/backend/src/server/web/boot.js
Original file line number Diff line number Diff line change
@@ -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);

0 comments on commit 8e5e6f9

Please sign in to comment.