Skip to content

Commit 417b0d3

Browse files
committed
Fix detection of mermaid objects
1 parent 88a25cc commit 417b0d3

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

_includes/mermaid.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
theme: initTheme /* <default|dark|forest|neutral> */
1717
};
1818

19-
2019
/* Markdown converts to HTML */
2120
$("pre").has("code.language-mermaid").each(function() {
2221
let svgCode = $(this).children().html();

_includes/mode-toggle.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
static get LIGHT_MODE() { return "light"; }
1818

1919
constructor() {
20-
if (this.mode != null) {
21-
if (this.mode == ModeToggle.DARK_MODE) {
20+
if (this.hasMode) {
21+
if (this.isDarkMode) {
2222
if (!this.isSysDarkPrefer) {
2323
this.setDark();
2424
}
@@ -92,7 +92,7 @@
9292
}
9393

9494
updateMermaid() {
95-
if (mermaid !== undefined) {
95+
if (typeof mermaid !== "undefined") {
9696
let expectedTheme = (this.modeStatus === ModeToggle.DARK_MODE? "dark" : "default");
9797
let config = { theme: expectedTheme };
9898

0 commit comments

Comments
 (0)