Skip to content

Commit

Permalink
Handle preload error
Browse files Browse the repository at this point in the history
  • Loading branch information
arifszn committed Jun 26, 2024
1 parent ca7c52c commit eb40a6c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,7 @@ ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
</ConfigProvider>
</React.StrictMode>
);

window?.addEventListener('vite:preloadError', () => {
window?.location?.reload();
});

0 comments on commit eb40a6c

Please sign in to comment.