aboutsummaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
authorIvan Chen <ivan@thetaggid.com>2020-12-22 11:51:45 -0500
committerGitHub <noreply@github.com>2020-12-22 11:51:45 -0500
commitea38a3965df2f194da37b1350eb4ed0baa3bd38b (patch)
tree6d5c8fce6e19b55972a22199a6c8f28047e74a06 /src/components
parenta954d6b6b88485dddc0ccfda634ffd102cb34ccd (diff)
added default values (#147)
Diffstat (limited to 'src/components')
-rw-r--r--src/components/search/SearchResults.tsx19
1 files changed, 10 insertions, 9 deletions
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>
);
};