Skip to content

Commit

Permalink
fix: fix bug call API with undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
eunsukimme committed Dec 2, 2023
1 parent 936f1d5 commit 390fe6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pages/post/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export default function PostPage() {
};

const post = postQuery.data;
const { data: meeting } = useQueryGetMeeting({ params: { id: String(post?.meeting.id) } });
const { data: meeting } = useQueryGetMeeting({ params: { id: post?.meeting.id ? String(post.meeting.id) : '' } });

const comments = commentQuery.data?.pages
.flatMap(page => page.data?.data?.comments)
Expand Down

0 comments on commit 390fe6e

Please sign in to comment.