We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cfe2ebd commit a1f2012Copy full SHA for a1f2012
src/App.js
@@ -20,7 +20,7 @@ const App = () => {
20
21
useEffect(() => {
22
const urlParams = new URLSearchParams(window.location.href.split('?')[1])
23
- const theme = urlParams.get('theme').match(/^[A-Za-z0-9\s]+/)[0]
+ const theme = urlParams.get('theme') && urlParams.get('theme').match(/^[A-Za-z0-9\s]+/)[0]
24
if (theme) {
25
setColorMode(theme)
26
}
0 commit comments