From e8843ded5bf1f3d97b735ffe8f8553de46f9b18b Mon Sep 17 00:00:00 2001
From: Paul Frazee <pfrazee@gmail.com>
Date: Fri, 2 Jun 2023 15:01:04 -0500
Subject: Fix a bunch of type errors and add a type-check to the github
 workflows (#837)

* Add yarn type-check

* Rename to yarn typecheck

* Fix a collection of type errors

* Add typecheck to automated tests

* add `dist` to exluded folders tsconfig

---------

Co-authored-by: Ansh Nanda <anshnanda10@gmail.com>
---
 src/view/com/util/UserInfoText.tsx | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'src/view/com/util/UserInfoText.tsx')

diff --git a/src/view/com/util/UserInfoText.tsx b/src/view/com/util/UserInfoText.tsx
index b8f6e082e..b737b2b1e 100644
--- a/src/view/com/util/UserInfoText.tsx
+++ b/src/view/com/util/UserInfoText.tsx
@@ -70,7 +70,9 @@ export function UserInfoText({
         numberOfLines={1}
         href={`/profile/${profile.handle}`}
         text={`${prefix || ''}${sanitizeDisplayName(
-          profile[attr] || profile.handle,
+          typeof profile[attr] === 'string' && profile[attr]
+            ? (profile[attr] as string)
+            : profile.handle,
         )}`}
       />
     )
-- 
cgit 1.4.1

