We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a74c2f2 commit 5924138Copy full SHA for 5924138
src/hooks/use-search/use-social-search.tsx
@@ -52,7 +52,7 @@ const useSocialSearch = (query?: string) => {
52
let usersResult: TSearchResultSection | undefined = undefined;
53
let postsResult: TSearchResultSection | undefined = undefined;
54
55
- if (searched.users?.nodes) {
+ if (searched.users?.nodes?.length) {
56
usersResult = {
57
title: 'Users',
58
results: searched.users.nodes.map(user => ({
@@ -65,7 +65,7 @@ const useSocialSearch = (query?: string) => {
65
};
66
}
67
68
- if (searched.posts?.nodes) {
+ if (searched.posts?.nodes?.length) {
69
postsResult = {
70
title: 'Experiments',
71
results: searched.posts.nodes.map(post => ({
0 commit comments