Skip to content

Commit

Permalink
Merge pull request #532 from cofacts/fix-null0user
Browse files Browse the repository at this point in the history
Don't throw error when article does not have ID
  • Loading branch information
MrOrz committed Feb 26, 2023
2 parents 1244820 + 6c65885 commit 7044c6a
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 7044c6a

Please sign in to comment.