From 4cf5b58f9bee080ab4b3d2eacf5520f22d3257cc Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Sun, 3 Nov 2024 16:04:30 -0300 Subject: [PATCH] re-add try catch --- src/plugins/_core/settings.tsx | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/plugins/_core/settings.tsx b/src/plugins/_core/settings.tsx index 3069c69b..a94e8cfa 100644 --- a/src/plugins/_core/settings.tsx +++ b/src/plugins/_core/settings.tsx @@ -149,13 +149,18 @@ export default definePlugin({ if (!header) return; - const names = { - top: getIntlMessage("USER_SETTINGS"), - aboveNitro: getIntlMessage("BILLING_SETTINGS"), - belowNitro: getIntlMessage("APP_SETTINGS"), - aboveActivity: getIntlMessage("ACTIVITY_SETTINGS") - }; - return header === names[settingsLocation]; + try { + const names = { + top: getIntlMessage("USER_SETTINGS"), + aboveNitro: getIntlMessage("BILLING_SETTINGS"), + belowNitro: getIntlMessage("APP_SETTINGS"), + aboveActivity: getIntlMessage("ACTIVITY_SETTINGS") + }; + + return header === names[settingsLocation]; + } catch { + return firstChild === "PREMIUM"; + } }, patchedSettings: new WeakSet(),