Skip to content

Commit

Permalink
series가 없을 때 _id에 접근하는 오류 수정 (24.03.28)
Browse files Browse the repository at this point in the history
series가 없을 때 _id에 접근하는 오류 수정 (24.03.28)
  • Loading branch information
seoko97 authored Mar 27, 2024
2 parents 2200c8c + b3d1462 commit 820ee80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/routes/post/post.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export class PostService {
throw new BadRequestException(POST_ERROR.NOT_FOUND);
}

const input: IUpdatePostArgs = { ...rest, series: post.series._id ?? null };
const input: IUpdatePostArgs = { ...rest, series: post.series?._id ?? null };
const prevSeriesName = post.series?.name ?? null;

try {
Expand Down

0 comments on commit 820ee80

Please sign in to comment.