From afadc178f2bc64e189f1dac9c165dbd7205f57e3 Mon Sep 17 00:00:00 2001 From: mrholek Date: Fri, 30 Jun 2023 13:10:03 +0200 Subject: [PATCH] refactor: update color modes handling --- src/App.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/App.vue b/src/App.vue index 84b32347..facb9cf4 100644 --- a/src/App.vue +++ b/src/App.vue @@ -15,8 +15,9 @@ export default { onBeforeMount(() => { const urlParams = new URLSearchParams(window.location.href.split('?')[1]) - if (urlParams.get('theme')) { - setColorMode(urlParams.get('theme')) + const theme = urlParams.get('theme').match(/^[A-Za-z0-9\s]+/)[0] + if (theme) { + setColorMode(theme) return }