BetterFolders: Fix try-catch with no effect (#3000)

This commit is contained in:
sadan4 2024-11-07 13:16:32 -05:00 committed by GitHub
parent cd3a998c4b
commit 5f7a2c59c6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -275,16 +275,16 @@ export default definePlugin({
}, },
makeGuildsBarGuildListFilter(isBetterFolders: boolean) { makeGuildsBarGuildListFilter(isBetterFolders: boolean) {
try {
return child => { return child => {
if (isBetterFolders) { if (isBetterFolders) {
try {
return child?.props?.["aria-label"] === getIntlMessage("SERVERS"); return child?.props?.["aria-label"] === getIntlMessage("SERVERS");
} catch (e) {
console.error(e);
}
} }
return true; return true;
}; };
} catch {
return true;
}
}, },
makeGuildsBarTreeFilter(isBetterFolders: boolean) { makeGuildsBarTreeFilter(isBetterFolders: boolean) {