From 7d6655fd49520aa5eecbd1db7ae0073bc41732a9 Mon Sep 17 00:00:00 2001 From: Elkorol Date: Sat, 17 Feb 2024 00:11:20 +0000 Subject: [PATCH 1/2] Applied Fix --- plugins/themeSwitch/themeSwitchMain.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/themeSwitch/themeSwitchMain.js b/plugins/themeSwitch/themeSwitchMain.js index eba9827c..a24807ef 100644 --- a/plugins/themeSwitch/themeSwitchMain.js +++ b/plugins/themeSwitch/themeSwitchMain.js @@ -1,6 +1,6 @@ -export default async () => { +(function () { while (!window.stash) { - await new Promise((resolve) => setTimeout(resolve, 100)); + new Promise((resolve) => setTimeout(resolve, 100)); } const svgChevDN = @@ -684,4 +684,4 @@ export default async () => { window.addEventListener("beforeunload", function () { menuCreated = false; }); -}; +})(); From 97e49a2e99a8a71bbb7b7580db198e9db22d362d Mon Sep 17 00:00:00 2001 From: Raghavan Date: Sat, 17 Feb 2024 07:06:36 +0530 Subject: [PATCH 2/2] wait for window.stash --- plugins/themeSwitch/themeSwitchMain.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/themeSwitch/themeSwitchMain.js b/plugins/themeSwitch/themeSwitchMain.js index a24807ef..114c13ea 100644 --- a/plugins/themeSwitch/themeSwitchMain.js +++ b/plugins/themeSwitch/themeSwitchMain.js @@ -1,6 +1,6 @@ -(function () { +(async () => { while (!window.stash) { - new Promise((resolve) => setTimeout(resolve, 100)); + await new Promise((resolve) => setTimeout(resolve, 100)); } const svgChevDN =