From 8aee54ba7ab444a7b908bfd74691280cd8252e54 Mon Sep 17 00:00:00 2001 From: Oj Date: Sat, 15 Jan 2022 20:41:01 +0000 Subject: [PATCH] [MainWindow] Wrap themesync in try catch --- src/mainWindowInject.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mainWindowInject.js b/src/mainWindowInject.js index ef399cc..4cc4c4b 100644 --- a/src/mainWindowInject.js +++ b/src/mainWindowInject.js @@ -16,7 +16,12 @@ const themesync = async () => { if (value !== pastValue) DiscordNative.userDataCache.cacheUserData(JSON.stringify(cached)); }; -setInterval(themesync, 3000); + +setInterval(() => { + try { + themesync(); + } catch (e) { } +}, 5000); const css = `