summaryrefslogtreecommitdiff
path: root/packages/frontend/src/boot
diff options
context:
space:
mode:
authoryukineko <27853966+hideki0403@users.noreply.github.com>2023-12-14 20:21:57 +0900
committerGitHub <noreply@github.com>2023-12-14 20:21:57 +0900
commit239507d7d6d0a8574bb641adee66d9da96537bb9 (patch)
treef057014a518fbe2171303efcb10f9436873667bb /packages/frontend/src/boot
parent(dev-mode) devモードの改善 (#12639) (diff)
downloadsharkey-239507d7d6d0a8574bb641adee66d9da96537bb9.tar.gz
sharkey-239507d7d6d0a8574bb641adee66d9da96537bb9.tar.bz2
sharkey-239507d7d6d0a8574bb641adee66d9da96537bb9.zip
fix: devモードの特定条件下でページが表示されなくなる問題を修正 (#12653)
* fix: devモードでキャッシュクリアするとページが表示されなくなる問題を修正 * fix: localeがnullの場合も最新のlocaleを取得するように
Diffstat (limited to 'packages/frontend/src/boot')
-rw-r--r--packages/frontend/src/boot/common.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/frontend/src/boot/common.ts b/packages/frontend/src/boot/common.ts
index 60f2781fdf..728f39962b 100644
--- a/packages/frontend/src/boot/common.ts
+++ b/packages/frontend/src/boot/common.ts
@@ -8,7 +8,7 @@ import { compareVersions } from 'compare-versions';
import widgets from '@/widgets/index.js';
import directives from '@/directives/index.js';
import components from '@/components/index.js';
-import { version, ui, lang, updateLocale } from '@/config.js';
+import { version, ui, lang, updateLocale, locale } from '@/config.js';
import { applyTheme } from '@/scripts/theme.js';
import { isDeviceDarkmode } from '@/scripts/is-device-darkmode.js';
import { i18n, updateI18n } from '@/i18n.js';
@@ -88,7 +88,7 @@ export async function common(createVue: () => App<Element>) {
//#region Detect language & fetch translations
const localeVersion = miLocalStorage.getItem('localeVersion');
- const localeOutdated = (localeVersion == null || localeVersion !== version);
+ const localeOutdated = (localeVersion == null || localeVersion !== version || locale == null);
if (localeOutdated) {
const res = await window.fetch(`/assets/locales/${lang}.${version}.json`);
if (res.status === 200) {