Skip to content

Commit a1f2012

Browse files
committed
refactor: update color modes support
1 parent cfe2ebd commit a1f2012

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/App.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const App = () => {
2020

2121
useEffect(() => {
2222
const urlParams = new URLSearchParams(window.location.href.split('?')[1])
23-
const theme = urlParams.get('theme').match(/^[A-Za-z0-9\s]+/)[0]
23+
const theme = urlParams.get('theme') && urlParams.get('theme').match(/^[A-Za-z0-9\s]+/)[0]
2424
if (theme) {
2525
setColorMode(theme)
2626
}

0 commit comments

Comments
 (0)