From 97e49a2e99a8a71bbb7b7580db198e9db22d362d Mon Sep 17 00:00:00 2001 From: Raghavan Date: Sat, 17 Feb 2024 07:06:36 +0530 Subject: [PATCH] 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 =