chore(web): guard root element instead of non-null assertion

This commit is contained in:
AyoubBenziza 2026-07-06 15:23:32 +02:00
parent 81242db008
commit 20556d334f

View file

@ -12,7 +12,12 @@ initAnalytics()
const queryClient = new QueryClient()
createRoot(document.getElementById("root")!).render(
const rootElement = document.getElementById("root")
if (!rootElement) {
throw new Error('Élément racine "#root" introuvable')
}
createRoot(rootElement).render(
<StrictMode>
<QueryClientProvider client={queryClient}>
<ThemeProvider>