From 968b9045795fe5f67ed7c1c3a41acf0be51b69cf Mon Sep 17 00:00:00 2001 From: mbaharip <62494292+mbahArip@users.noreply.github.com> Date: Sun, 26 Jan 2025 03:20:41 +0700 Subject: [PATCH] fix: breadcrumb path missing last item because of `pop()` --- src/app/[...rest]/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/[...rest]/page.tsx b/src/app/[...rest]/page.tsx index 427cae9..5b2f3c9 100644 --- a/src/app/[...rest]/page.tsx +++ b/src/app/[...rest]/page.tsx @@ -69,7 +69,7 @@ export default async function RestPage({ params }: Props) { ); } - const currentPath = paths.data.pop(); + const currentPath = paths.data[paths.data.length - 1]; if (!currentPath) return ; const Layout: React.FC<{