From a3c3052d0fae8223b73b4ee0abca2b6702da92a2 Mon Sep 17 00:00:00 2001
From: syuilo <4439005+syuilo@users.noreply.github.com>
Date: Thu, 4 Dec 2025 15:19:15 +0900
Subject: fix(frontend): stacking router
 viewで連続して戻る操作を行うと何も表示されなくなる問題を修正
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 packages/frontend/src/components/global/StackingRouterView.vue | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'packages/frontend/src/components/global/StackingRouterView.vue')

diff --git a/packages/frontend/src/components/global/StackingRouterView.vue b/packages/frontend/src/components/global/StackingRouterView.vue
index 4c56767608..e9c24bfcb4 100644
--- a/packages/frontend/src/components/global/StackingRouterView.vue
+++ b/packages/frontend/src/components/global/StackingRouterView.vue
@@ -74,7 +74,9 @@ function mount() {
 }
 
 function back() {
-	const prev = tabs.value[tabs.value.length - 2];
+	const prev = tabs.value.at(tabs.value.length - 2);
+	if (prev == null) return; // transitionの関係でprevが無い状態でbackが呼ばれることがある
+
 	tabs.value = [...tabs.value.slice(0, tabs.value.length - 1)];
 	router?.replaceByPath(prev.fullPath);
 }
-- 
cgit v1.2.3-freya

