From 372484f976dd45dc23116ce3b1ad7efa1a9c6f5f Mon Sep 17 00:00:00 2001 From: Marc-Andre Ferland Date: Tue, 18 Oct 2022 03:21:59 -0400 Subject: [PATCH] Fixed theme loading with extensions. --- ui/media/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/media/main.js b/ui/media/main.js index 31f17b0f..b1c05906 100644 --- a/ui/media/main.js +++ b/ui/media/main.js @@ -1757,7 +1757,7 @@ function getThemeName(theme) { // init themefield function initTheme() { Array.from(document.styleSheets) - .filter(sheet => sheet.href.startsWith(window.location.origin)) + .filter(sheet => sheet.href?.startsWith(window.location.origin)) .flatMap(sheet => Array.from(sheet.cssRules)) .forEach(rule => { var selector = rule.selectorText; // TODO: also do selector == ":root", re-run un-set props