Fix exporting from nightly where the data-mx-theme is `Light` not `light` (#7416)

pull/21833/head
Michael Telatynski 2021-12-20 11:36:47 +00:00 committed by GitHub
parent 3dde039831
commit d10ac7cfdb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -39,7 +39,8 @@ function mutateCssText(css: string): string {
const getExportCSS = async (usedClasses: Set<string>): Promise<string> => {
// 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 = "";