From 44e607de4a6354822605856bf12c1b7a68a66fed Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 20 Dec 2021 11:28:13 +0000 Subject: [PATCH] Fix exporting from nightly where the data-mx-theme is `Light` not `light` --- src/utils/exportUtils/exportCSS.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/utils/exportUtils/exportCSS.ts b/src/utils/exportUtils/exportCSS.ts index 671d3326182..9f52edf89a4 100644 --- a/src/utils/exportUtils/exportCSS.ts +++ b/src/utils/exportUtils/exportCSS.ts @@ -39,7 +39,8 @@ function mutateCssText(css: string): string { const getExportCSS = async (usedClasses: Set): Promise => { // only include bundle.css and the data-mx-theme=light styling const stylesheets = Array.from(document.styleSheets).filter(s => { - return s.href?.endsWith("bundle.css") || (s.ownerNode as HTMLStyleElement).dataset.mxTheme === "light"; + return s.href?.endsWith("bundle.css") || + (s.ownerNode as HTMLStyleElement).dataset.mxTheme.toLowerCase() === "light"; }); let css = "";