Skip to content

Commit 67a9462

Browse files
committed
Only active mode toggling if bs is present (no error if not present)!
1 parent c50766e commit 67a9462

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/resources/formats/html/templates/quarto-html.ejs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ window.document.addEventListener("DOMContentLoaded", function (event) {
1717
}
1818
1919
const toggleBodyColorPrimary = () => {
20-
toggleBodyColorMode(window.document.querySelector("link#quarto-bootstrap"));
20+
const bsSheetEl = window.document.querySelector("link#quarto-bootstrap");
21+
if (bsSheetEl) {
22+
toggleBodyColorMode(bsSheetEl);
23+
}
2124
}
2225
2326
toggleBodyColorPrimary();

0 commit comments

Comments
 (0)