Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🖥️ Preview
(없음)
close #192
✏️ 한 일
❗️ 발생한 이슈 (해결 방안)
최종 결과를 보여주는 화면에서 rank, totalParticipants가 null일 경우가 존재하지 않는다고 생각했다.
실제로 타입을 다음과 같이 정의해놨고 타입 추론도 number | undefined였기 때문이다.
근데 보아하니 두 값들을 가져오는 resultData 자체가 null일 가능성이 존재했다.
따라서 formatNumber 함수의 value 부분에 null도 추가로 처리해주었다.
❓ 논의가 필요한 사항