Skip to content

Commit ad30a84

Browse files
committed
fix(@toss/hangul): replace non-null assertion(!) with nullish coalescing operator (??)
1 parent e5bee62 commit ad30a84

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/common/hangul/src/disassembleCompleteHangulCharacter.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ export function disassembleCompleteHangulCharacter(
2727
const firstIndex = Math.floor((hangulCode - lastIndex) / NUMBER_OF_JONGSUNG / NUMBER_OF_JUNGSUNG);
2828

2929
return {
30-
first: HANGUL_CHARACTERS_BY_FIRST_INDEX[firstIndex]!,
31-
middle: HANGUL_CHARACTERS_BY_MIDDLE_INDEX[middleIndex]!,
32-
last: HANGUL_CHARACTERS_BY_LAST_INDEX[lastIndex]!,
30+
first: HANGUL_CHARACTERS_BY_FIRST_INDEX[firstIndex] ?? '',
31+
middle: HANGUL_CHARACTERS_BY_MIDDLE_INDEX[middleIndex] ?? '',
32+
last: HANGUL_CHARACTERS_BY_LAST_INDEX[lastIndex] ?? '',
3333
};
3434
}

0 commit comments

Comments
 (0)