aboutsummaryrefslogtreecommitdiff
path: root/src/utils/misc.tsx
diff options
context:
space:
mode:
authorVendicated <vendicated@riseup.net>2023-02-25 19:10:01 +0100
committerVendicated <vendicated@riseup.net>2023-02-25 19:10:01 +0100
commit128ee41252b1bf9c3e415ec94ce26d5dc3e7c7ee (patch)
treeef393cbeceb10886c3edba7a2d1bbab4e6d298c5 /src/utils/misc.tsx
parentccca41a16832a34efa83506a6baf23d8bd2a6367 (diff)
downloadVencord-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/misc.tsx')
-rw-r--r--src/utils/misc.tsx4
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(" ");
}
/**