aboutsummaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils')
-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(" ");
}
/**