From 4cf9932887bb17b9cea60fda89e95420b84a223c Mon Sep 17 00:00:00 2001 From: JCNoguera Date: Mon, 6 May 2024 14:38:20 +0200 Subject: [PATCH] fix: basic authentication error with react Co-authored-by: Bran <52735957+brancoder@users.noreply.github.com> --- client/src/index.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/src/index.tsx b/client/src/index.tsx index 8e7634c2c..89ddbc15a 100644 --- a/client/src/index.tsx +++ b/client/src/index.tsx @@ -55,8 +55,10 @@ const AppInitializer = () => { // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const container = document.getElementById("root")!; -const root = createRoot(container); -root.render(); +if (!container.hasChildNodes()) { + const root = createRoot(container); + root.render(); +} /** * Register all the services.