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

Commit 230919d

Browse files
committed
fix issue with injected styles exploding the theme engine
1 parent 33e8edb commit 230919d

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)