diff --git a/src/main.tsx b/src/main.tsx index ea9e3630..756428b4 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -1,9 +1,16 @@ import { StrictMode } from 'react'; import { createRoot } from 'react-dom/client'; -import App from './App.tsx'; +import App from './App'; import './index.css'; -createRoot(document.getElementById('root')!).render( +// Ensure 'root' element exists to avoid runtime errors +const rootElement = document.getElementById('root'); +if (!rootElement) { + throw new Error('Root element not found'); +} + +const root = createRoot(rootElement); +root.render(