Skip to content

Commit

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

* Create yellow-forks-trade.md

---------

Co-authored-by: 박찬혁 <[email protected]>
  • Loading branch information
jungwoo3490 and okinawaa authored May 3, 2024
1 parent 36313f9 commit 1292575
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/yellow-forks-trade.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
es-hangul : "patch"
---

fix: 호환성 개선을 위해 배열의 마지막 요소 가져오는 부분 수정
2 changes: 1 addition & 1 deletion src/_internal/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export function excludeLastElement(array: string[]): [string[], string] {
const lastElement = array.at(-1);
const lastElement = array[array.length - 1];
return [array.slice(0, -1), lastElement ?? ''];
}

Expand Down

0 comments on commit 1292575

Please sign in to comment.