diff options
author | Vendicated <vendicated@riseup.net> | 2023-02-16 22:46:51 +0100 |
---|---|---|
committer | Vendicated <vendicated@riseup.net> | 2023-02-16 22:46:51 +0100 |
commit | 6807820f6c47fbd4afb8d2b1d83469b60490dd65 (patch) | |
tree | 1739faf3c47649238ee2916a95ff42c56291da15 /src | |
parent | 3cad0d60b4524b3c58141835e458b129fa75bb12 (diff) | |
download | Vencord-6807820f6c47fbd4afb8d2b1d83469b60490dd65.tar.gz Vencord-6807820f6c47fbd4afb8d2b1d83469b60490dd65.tar.bz2 Vencord-6807820f6c47fbd4afb8d2b1d83469b60490dd65.zip |
Badges should use ErrorBoundaries
Diffstat (limited to 'src')
-rw-r--r-- | src/api/Badges.ts | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/api/Badges.ts b/src/api/Badges.ts index 3607f37..d4aabaf 100644 --- a/src/api/Badges.ts +++ b/src/api/Badges.ts @@ -16,6 +16,7 @@ * along with this program. If not, see <https://www.gnu.org/licenses/>. */ +import ErrorBoundary from "@components/ErrorBoundary"; import { User } from "discord-types/general"; import { ComponentType, HTMLProps } from "react"; @@ -52,6 +53,7 @@ const Badges = new Set<ProfileBadge>(); * @param badge The badge to register */ export function addBadge(badge: ProfileBadge) { + badge.component &&= ErrorBoundary.wrap(badge.component, { noop: true }); Badges.add(badge); } |