ErrorBoundary: Do not use any Discord components to be more robust

This commit is contained in:
Vendicated 2023-02-25 19:10:01 +01:00
parent ccca41a168
commit 128ee41252
No known key found for this signature in database
GPG key ID: A1DC0CFB5615D905
4 changed files with 20 additions and 23 deletions

View file

@ -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(" ");
}
/**