File tree Expand file tree Collapse file tree 1 file changed +16
-10
lines changed
packages/gatsby-theme/src/pages Expand file tree Collapse file tree 1 file changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -69,19 +69,25 @@ const ProfilePage: React.FunctionComponent<ProfileProps> = ({ user }) => {
69
69
< button onClick = { ( ) => logoutUser ( ) } > Log out </ button >
70
70
< Heading > Upvoted Tutorials </ Heading >
71
71
< ul >
72
- { user . upvoted . map ( a => (
73
- < li key = { a . tutorial . id } >
74
- < span > { a . tutorial . name } </ span >
75
- </ li >
76
- ) ) }
72
+ { user . upvoted . map (
73
+ a =>
74
+ a . tutorial && (
75
+ < li key = { a . tutorial . id } >
76
+ < span > { a . tutorial . name } </ span >
77
+ </ li >
78
+ ) ,
79
+ ) }
77
80
</ ul >
78
81
< Heading > Saved Tutorials </ Heading >
79
82
< ul >
80
- { user . saved . map ( a => (
81
- < li key = { a . tutorial . id } >
82
- < span > { a . tutorial . name } </ span >
83
- </ li >
84
- ) ) }
83
+ { user . saved . map (
84
+ a =>
85
+ a . tutorial && (
86
+ < li key = { a . tutorial . id } >
87
+ < span > { a . tutorial . name } </ span >
88
+ </ li >
89
+ ) ,
90
+ ) }
85
91
</ ul >
86
92
</ Layout >
87
93
) ;
You can’t perform that action at this time.
0 commit comments