From 06c75ebc8e87ce9e0ff68904a537423154b0bc9d Mon Sep 17 00:00:00 2001 From: Johann Schopplich Date: Mon, 10 Aug 2020 15:40:47 +0200 Subject: [PATCH] Simplify html selector (#4) --- src/utils/dark.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/dark.ts b/src/utils/dark.ts index 0b330c1..ad70d34 100644 --- a/src/utils/dark.ts +++ b/src/utils/dark.ts @@ -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 },