Skip to content

Commit

Permalink
perf(frontend): splash screenのdomが消えない場合があるのを修正
Browse files Browse the repository at this point in the history
  • Loading branch information
syuilo committed Feb 9, 2024
1 parent 614c9a0 commit c23c97d
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions packages/frontend/src/boot/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,6 @@ export async function common(createVue: () => App<Element>) {
});
}

const splash = document.getElementById('splash');
// 念のためnullチェック(HTMLが古い場合があるため(そのうち消す))
if (splash) splash.addEventListener('transitionend', () => {
splash.remove();
});

let isClientUpdated = false;

//#region クライアントが更新されたかチェック
Expand Down Expand Up @@ -289,5 +283,10 @@ function removeSplash() {
if (splash) {
splash.style.opacity = '0';
splash.style.pointerEvents = 'none';

// transitionendイベントが発火しない場合があるため
window.setTimeout(() => {
splash.remove();
}, 1000);
}
}

0 comments on commit c23c97d

Please sign in to comment.