mirror of
https://github.com/vector-im/element-web.git
synced 2026-05-05 12:16:53 +02:00
fix issue with injected styles exploding the theme engine
This commit is contained in:
parent
33e8edb3d5
commit
230919dd66
@ -176,7 +176,7 @@ export async function setTheme(theme) {
|
||||
for (let i = 0; (a = document.getElementsByTagName("link")[i]); i++) {
|
||||
const href = a.getAttribute("href");
|
||||
// shouldn't we be using the 'title' tag rather than the href?
|
||||
const match = href.match(/^bundles\/.*\/theme-(.*)\.css$/);
|
||||
const match = href && href.match(/^bundles\/.*\/theme-(.*)\.css$/);
|
||||
if (match) {
|
||||
styleElements[match[1]] = a;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user