From 8a40026c5cc4acb8a290eca81dcfdd5b565a2123 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 14 Nov 2021 13:13:05 +0900 Subject: [PATCH] fix(client): improve error handling --- packages/backend/src/server/web/boot.js | 2 -- packages/client/src/init.ts | 8 ++++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/backend/src/server/web/boot.js b/packages/backend/src/server/web/boot.js index d4a2529e6..751e8619b 100644 --- a/packages/backend/src/server/web/boot.js +++ b/packages/backend/src/server/web/boot.js @@ -45,8 +45,6 @@ localStorage.setItem('lang', lang); localStorage.setItem('locale', await res.text()); localStorage.setItem('localeVersion', v); - } else if (localeOutdated) { - // nop } else { await checkUpdate(); renderError('LOCALE_FETCH_FAILED'); diff --git a/packages/client/src/init.ts b/packages/client/src/init.ts index da5b0489a..27ed78106 100644 --- a/packages/client/src/init.ts +++ b/packages/client/src/init.ts @@ -42,10 +42,6 @@ import { getAccountFromId } from '@/scripts/get-account-from-id'; console.info(`Misskey v${version}`); -// boot.jsのやつを解除 -window.onerror = null; -window.onunhandledrejection = null; - if (_DEV_) { console.warn('Development mode!!!'); @@ -224,6 +220,10 @@ const rootEl = document.createElement('div'); document.body.appendChild(rootEl); app.mount(rootEl); +// boot.jsのやつを解除 +window.onerror = null; +window.onunhandledrejection = null; + reactionPicker.init(); if (splash) {