diff --git a/source/js/tools/lightDarkSwitch.js b/source/js/tools/lightDarkSwitch.js index 838c745e..8cf4038e 100755 --- a/source/js/tools/lightDarkSwitch.js +++ b/source/js/tools/lightDarkSwitch.js @@ -150,10 +150,12 @@ export const ModeToggle = { typeof theme.mermaid.style.dark !== "undefined" ? theme.mermaid.style.dark : "dark"; - await saveOriginalData().catch(console.error); this.initModeStatus(); this.initModeToggleButton(); this.initModeAutoTrigger(); + try { + await saveOriginalData().catch(console.error); + } catch (error) {} }, };