From 3b13a623cd755af6b196558d95515c428b8a1d83 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 23 Jun 2020 17:54:57 +0200 Subject: [PATCH] cleanup --- src/theme.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/theme.js b/src/theme.js index d560cc96c8..ee9cb9c7db 100644 --- a/src/theme.js +++ b/src/theme.js @@ -179,7 +179,7 @@ export async function setTheme(theme) { if (a == styleElements[stylesheetName]) return; a.disabled = true; }); - const bodyStyles = global.getComputedStyle(document.getElementsByTagName("body")[0]); + const bodyStyles = global.getComputedStyle(document.body); if (bodyStyles.backgroundColor) { document.querySelector('meta[name="theme-color"]').content = bodyStyles.backgroundColor; }