From ea38a3965df2f194da37b1350eb4ed0baa3bd38b Mon Sep 17 00:00:00 2001
From: Ivan Chen <ivan@thetaggid.com>
Date: Tue, 22 Dec 2020 11:51:45 -0500
Subject: added default values (#147)

---
 src/components/search/SearchResults.tsx | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

(limited to 'src/components/search/SearchResults.tsx')

diff --git a/src/components/search/SearchResults.tsx b/src/components/search/SearchResults.tsx
index 9d95593a..bf355220 100644
--- a/src/components/search/SearchResults.tsx
+++ b/src/components/search/SearchResults.tsx
@@ -29,15 +29,16 @@ const SearchResults: React.FC<SearchResultsProps> = ({
   }
   return (
     <View style={containerStyle}>
-      {results.map((profilePreview) => (
-        <ProfilePreview
-          style={styles.result}
-          key={profilePreview.id}
-          {...{profilePreview}}
-          previewType={previewType}
-          screenType={screenType}
-        />
-      ))}
+      {results &&
+        results.map((profilePreview) => (
+          <ProfilePreview
+            style={styles.result}
+            key={profilePreview.id}
+            {...{profilePreview}}
+            previewType={previewType}
+            screenType={screenType}
+          />
+        ))}
     </View>
   );
 };
-- 
cgit v1.2.3-70-g09d2

