From 3ad368c6dd83fb992dbc07eefcb464b7c0dfbd14 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 30 Oct 2025 02:31:26 +0000 Subject: [PATCH] fix: app null reference error --- src/App.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App.js b/src/App.js index f5b22393e..1529efbdd 100644 --- a/src/App.js +++ b/src/App.js @@ -23,7 +23,7 @@ const App = () => { useEffect(() => { const urlParams = new URLSearchParams(window.location.href.split('?')[1]) - const theme = urlParams.get('theme') && urlParams.get('theme').match(/^[A-Za-z0-9\s]+/)[0] + const theme = urlParams.get('theme')?.match(/^[A-Za-z0-9\s]+/)?.[0] if (theme) { setColorMode(theme) }