diff options
author | Vendicated <vendicated@riseup.net> | 2023-02-25 19:10:01 +0100 |
---|---|---|
committer | Vendicated <vendicated@riseup.net> | 2023-02-25 19:10:01 +0100 |
commit | 128ee41252b1bf9c3e415ec94ce26d5dc3e7c7ee (patch) | |
tree | ef393cbeceb10886c3edba7a2d1bbab4e6d298c5 /src/utils | |
parent | ccca41a16832a34efa83506a6baf23d8bd2a6367 (diff) | |
download | Vencord-128ee41252b1bf9c3e415ec94ce26d5dc3e7c7ee.tar.gz Vencord-128ee41252b1bf9c3e415ec94ce26d5dc3e7c7ee.tar.bz2 Vencord-128ee41252b1bf9c3e415ec94ce26d5dc3e7c7ee.zip |
ErrorBoundary: Do not use any Discord components to be more robust
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/misc.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/utils/misc.tsx b/src/utils/misc.tsx index a41ab67..b64dff9 100644 --- a/src/utils/misc.tsx +++ b/src/utils/misc.tsx @@ -141,8 +141,8 @@ export function humanFriendlyJoin(elements: any[], mapper: (e: any) => string = * Calls .join(" ") on the arguments * classes("one", "two") => "one two" */ -export function classes(...classes: string[]) { - return classes.filter(c => typeof c === "string").join(" "); +export function classes(...classes: Array<string | null | undefined>) { + return classes.filter(Boolean).join(" "); } /** |