diff --git a/plugins/themeSwitch/themeSwitchMain.js b/plugins/themeSwitch/themeSwitchMain.js index 9dfcd969..eba9827c 100644 --- a/plugins/themeSwitch/themeSwitchMain.js +++ b/plugins/themeSwitch/themeSwitchMain.js @@ -1,4 +1,8 @@ -(function () { +export default async () => { + while (!window.stash) { + await new Promise((resolve) => setTimeout(resolve, 100)); + } + const svgChevDN = ''; const svgChevUP = @@ -680,4 +684,4 @@ window.addEventListener("beforeunload", function () { menuCreated = false; }); -})(); +};