mirror of https://github.com/vector-im/riot-web
Merge pull request #5810 from matrix-org/t3chguy/fix/167414
Fix the theme engine breaking with some web theming extensionspull/21833/head
commit
7c3a7b54e7
|
@ -176,7 +176,7 @@ export async function setTheme(theme) {
|
||||||
for (let i = 0; (a = document.getElementsByTagName("link")[i]); i++) {
|
for (let i = 0; (a = document.getElementsByTagName("link")[i]); i++) {
|
||||||
const href = a.getAttribute("href");
|
const href = a.getAttribute("href");
|
||||||
// shouldn't we be using the 'title' tag rather than the 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) {
|
if (match) {
|
||||||
styleElements[match[1]] = a;
|
styleElements[match[1]] = a;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue