This commit is contained in:
Bruno Windels 2020-06-23 17:54:57 +02:00
parent 2f6fc6bba2
commit 3b13a623cd

View file

@ -179,7 +179,7 @@ export async function setTheme(theme) {
if (a == styleElements[stylesheetName]) return; if (a == styleElements[stylesheetName]) return;
a.disabled = true; a.disabled = true;
}); });
const bodyStyles = global.getComputedStyle(document.getElementsByTagName("body")[0]); const bodyStyles = global.getComputedStyle(document.body);
if (bodyStyles.backgroundColor) { if (bodyStyles.backgroundColor) {
document.querySelector('meta[name="theme-color"]').content = bodyStyles.backgroundColor; document.querySelector('meta[name="theme-color"]').content = bodyStyles.backgroundColor;
} }