Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 7c3a7b5

Browse files
authored
Merge pull request #5810 from matrix-org/t3chguy/fix/167414
Fix the theme engine breaking with some web theming extensions
2 parents 6612028 + 230919d commit 7c3a7b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/theme.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ export async function setTheme(theme) {
176176
for (let i = 0; (a = document.getElementsByTagName("link")[i]); i++) {
177177
const href = a.getAttribute("href");
178178
// shouldn't we be using the 'title' tag rather than the href?
179-
const match = href.match(/^bundles\/.*\/theme-(.*)\.css$/);
179+
const match = href && href.match(/^bundles\/.*\/theme-(.*)\.css$/);
180180
if (match) {
181181
styleElements[match[1]] = a;
182182
}

0 commit comments

Comments
 (0)