From 6904369459230884376b3d9d21357ae5601aba13 Mon Sep 17 00:00:00 2001 From: Elkorol Date: Fri, 16 Feb 2024 23:56:32 +0000 Subject: [PATCH] Intialisation Fix --- plugins/themeSwitch/themeSwitchMain.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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; }); -})(); +};