File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const propTypes = {
77
};
88

99
function Post({ post }) {
10-
const commentWidgets = (post.comments || []).map(c => <Comment key={c.id} comment={c} />);
10+
const commentWidgets = post.comments.map(c => <Comment key={c.id} comment={c} />);
1111

1212
return (
1313
<div className="post">
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const propTypes = {
66
};
77

88
function Question({ question }) {
9-
const postWidgets = (question.posts || []).map(post => <Post key={post.id} post={post} />);
9+
const postWidgets = question.posts.map(post => <Post key={post.id} post={post} />);
1010

1111
return (
1212
<div className="question">

0 commit comments

Comments
 (0)