Simplify html selector (#4)

This commit is contained in:
Johann Schopplich 2020-08-10 15:40:47 +02:00 committed by GitHub
parent 5b07b3865a
commit 06c75ebc8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,7 +19,7 @@ export const isDark = computed({
watch(
isDark,
(v) => {
const html = document.getElementsByTagName('html')[0]
const html = document.documentElement
html.classList.toggle('schema-dark', v)
},
{ immediate: true },