diff --git a/src/main.tsx b/src/main.tsx index 4c5b6c0..8ec0418 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -7,7 +7,12 @@ import App from "./App"; const convex = new ConvexReactClient(import.meta.env.VITE_CONVEX_URL as string); -createRoot(document.getElementById("root")!).render( +const rootElement = document.getElementById("root"); +if (!rootElement) { + throw new Error("Root element not found"); +} + +createRoot(rootElement).render(