Skip to content

Commit

Permalink
fix: removeLastHangulCharacter 호환성 개선 - 문자열의 마지막 글자 가져오는 로직 수정 (#113)
Browse files Browse the repository at this point in the history
* fix: 호환성을 위해 배열의 마지막 요소 가져오는 부분 수정

* fix: 호환성을 위해 문자열의 마지막 글자 가져오는 로직 수정
  • Loading branch information
jungwoo3490 committed Jun 3, 2024
1 parent 5379e66 commit 0c71f6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/removeLastHangulCharacter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { excludeLastElement } from './_internal';
*/
export function removeLastHangulCharacter(words: string) {
const disassembledGroups = disassembleHangulToGroups(words);
const lastCharacter = disassembledGroups.at(-1);
const lastCharacter = disassembledGroups[disassembledGroups.length - 1];

if (lastCharacter == null) {
return '';
Expand Down

0 comments on commit 0c71f6f

Please sign in to comment.