Fix category colors sometimes not working

This commit is contained in:
Ajay
2023-07-18 13:26:41 -04:00
parent bbc5c11667
commit 6f8c44b2eb

View File

@@ -2489,7 +2489,9 @@ function setCategoryColorCSSVariables() {
if (!styleContainer) { if (!styleContainer) {
styleContainer = document.createElement("style"); styleContainer = document.createElement("style");
styleContainer.id = "sbCategoryColorStyle"; styleContainer.id = "sbCategoryColorStyle";
document.head.appendChild(styleContainer)
const head = (document.head || document.documentElement);
head.appendChild(styleContainer)
} }
let css = ":root {" let css = ":root {"