Skip to content

Commit afadc17

Browse files
committedJun 30, 2023
refactor: update color modes handling
1 parent 8a7baa6 commit afadc17

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
 

‎src/App.vue

+3-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ export default {
1515
1616
onBeforeMount(() => {
1717
const urlParams = new URLSearchParams(window.location.href.split('?')[1])
18-
if (urlParams.get('theme')) {
19-
setColorMode(urlParams.get('theme'))
18+
const theme = urlParams.get('theme').match(/^[A-Za-z0-9\s]+/)[0]
19+
if (theme) {
20+
setColorMode(theme)
2021
return
2122
}
2223

0 commit comments

Comments
 (0)
Please sign in to comment.