commit: eca8da6593f693052ed68fd86754f40c383cf94f
parent 1306c46a53ec37bb738b4d6eb32be9c59b2136fe
Author: Henry Jameson <me@hjkos.com>
Date: Fri, 21 Jun 2024 22:45:10 +0300
fixed a "leak" that made too many <style> elements
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/services/style_setter/style_setter.js b/src/services/style_setter/style_setter.js
@@ -188,7 +188,9 @@ export const applyConfig = (input) => {
.filter(([k, v]) => v)
.map(([k, v]) => `--${k}: ${v}`).join(';')
+ document.getElementById('style-config')?.remove()
const styleEl = document.createElement('style')
+ styleEl.id = 'style-config'
head.appendChild(styleEl)
const styleSheet = styleEl.sheet