re-add try catch

This commit is contained in:
Nuckyz 2024-11-03 16:04:30 -03:00
parent f8bdd8ef2a
commit 4cf5b58f9b
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9

View file

@ -149,13 +149,18 @@ export default definePlugin({
if (!header) return; if (!header) return;
const names = { try {
top: getIntlMessage("USER_SETTINGS"), const names = {
aboveNitro: getIntlMessage("BILLING_SETTINGS"), top: getIntlMessage("USER_SETTINGS"),
belowNitro: getIntlMessage("APP_SETTINGS"), aboveNitro: getIntlMessage("BILLING_SETTINGS"),
aboveActivity: getIntlMessage("ACTIVITY_SETTINGS") belowNitro: getIntlMessage("APP_SETTINGS"),
}; aboveActivity: getIntlMessage("ACTIVITY_SETTINGS")
return header === names[settingsLocation]; };
return header === names[settingsLocation];
} catch {
return firstChild === "PREMIUM";
}
}, },
patchedSettings: new WeakSet(), patchedSettings: new WeakSet(),