Skip to content

Commit df74bc3

Browse files
committed
modify: type undefined 방어
1 parent 5ea5847 commit df74bc3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/services/user.service.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ export class UserService {
5656
refreshToken: string,
5757
): Promise<User> {
5858
// velog response 에서 주는 응답 혼용 방지를 위한 변경 id -> uuid
59-
const { id: uuid, email = null, username, profile: { thumbnail } } = userData;
59+
const { id: uuid, email = null, username, profile } = userData;
60+
const thumbnail = profile?.thumbnail || null // undefined 방어
6061
try {
6162
let user = await this.userRepo.findByUserVelogUUID(uuid);
6263

0 commit comments

Comments
 (0)