diff --git a/scripts/on_sd_start.bat b/scripts/on_sd_start.bat index f0619ae9..17f9f8ac 100644 --- a/scripts/on_sd_start.bat +++ b/scripts/on_sd_start.bat @@ -1,6 +1,6 @@ @echo off -@REM @copy sd-ui-files\scripts\on_env_start.bat scripts\ /Y +@copy sd-ui-files\scripts\on_env_start.bat scripts\ /Y @REM Caution, this file will make your eyes and brain bleed. It's such an unholy mess. @REM Note to self: Please rewrite this in Python. For the sake of your own sanity. 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