From 12925756c20ef26da86dc3c38f3c6608eb0c2176 Mon Sep 17 00:00:00 2001 From: Jungwoo LEE Date: Fri, 3 May 2024 22:53:42 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=ED=98=B8=ED=99=98=EC=84=B1=20=EA=B0=9C?= =?UTF-8?q?=EC=84=A0=EC=9D=84=20=EC=9C=84=ED=95=B4=20=EB=B0=B0=EC=97=B4?= =?UTF-8?q?=EC=9D=98=20=EB=A7=88=EC=A7=80=EB=A7=89=20=EC=9A=94=EC=86=8C=20?= =?UTF-8?q?=EA=B0=80=EC=A0=B8=EC=98=A4=EB=8A=94=20=EB=A1=9C=EC=A7=81=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=20(#83)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: 호환성을 위해 배열의 마지막 요소 가져오는 부분 수정 * Create yellow-forks-trade.md --------- Co-authored-by: 박찬혁 --- .changeset/yellow-forks-trade.md | 5 +++++ src/_internal/index.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/yellow-forks-trade.md diff --git a/.changeset/yellow-forks-trade.md b/.changeset/yellow-forks-trade.md new file mode 100644 index 00000000..f272384a --- /dev/null +++ b/.changeset/yellow-forks-trade.md @@ -0,0 +1,5 @@ +--- +es-hangul : "patch" +--- + +fix: 호환성 개선을 위해 배열의 마지막 요소 가져오는 부분 수정 diff --git a/src/_internal/index.ts b/src/_internal/index.ts index 48aa3bb0..2bd625d8 100644 --- a/src/_internal/index.ts +++ b/src/_internal/index.ts @@ -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 ?? '']; }