Skip to content

Commit

Permalink
fix: refreshing the mermaid theme may fail
Browse files Browse the repository at this point in the history
  • Loading branch information
cotes2020 committed Dec 11, 2024
1 parent 0360c9e commit 5cddf57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion _javascript/modules/components/mermaid.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function refreshTheme(event) {
const mermaidList = document.getElementsByClassName(MERMAID);

[...mermaidList].forEach((elem) => {
const svgCode = elem.previousSibling.children.item(0).innerHTML;
const svgCode = elem.previousSibling.children.item(0).textContent;
elem.textContent = svgCode;
elem.removeAttribute('data-processed');
});
Expand Down

0 comments on commit 5cddf57

Please sign in to comment.