Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
null-guard dataset mxTheme to prevent html exports from exploding (#7493
Browse files Browse the repository at this point in the history
)
  • Loading branch information
t3chguy authored Jan 10, 2022
1 parent 31ab913 commit f7d19a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/exportUtils/exportCSS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ 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.toLowerCase() === "light";
(s.ownerNode as HTMLStyleElement).dataset.mxTheme?.toLowerCase() === "light";
});

let css = "";
Expand Down

0 comments on commit f7d19a5

Please sign in to comment.