Skip to content

Commit

Permalink
Don't throw error when article does not have ID
Browse files Browse the repository at this point in the history
- articleUserId is just used in reporting user, should not block page from rendering
  • Loading branch information
MrOrz committed Feb 25, 2023
1 parent 1244820 commit 6c65885
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pages/article/[id].js
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ function ArticlePage() {
<CreateReplyRequestForm
requestedForReply={article.requestedForReply}
articleId={article.id}
articleUserId={article.user.id}
articleUserId={article.user?.id || 'N/A'}
onNewReplyButtonClick={() => {
setShowForm(true);
// use setTimeout to make sure the form has shown
Expand Down

0 comments on commit 6c65885

Please sign in to comment.