chore: improve syntax

This commit is contained in:
mrholek
2023-09-26 17:58:17 +02:00
parent d9ec6a488f
commit 3a6356e5b4
+3 -1
View File
@@ -15,7 +15,9 @@ export default {
onBeforeMount(() => {
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') &&
urlParams.get('theme').match(/^[A-Za-z0-9\s]+/)[0]
if (theme) {
setColorMode(theme)
return