From d10ac7cfdb91de32167f6689348a80a3a2bf8114 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 20 Dec 2021 11:36:47 +0000 Subject: [PATCH] Fix exporting from nightly where the data-mx-theme is `Light` not `light` (#7416) --- 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 671d332618..9f52edf89a 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 = "";