From c186f87b91f105b9d59590235f279f4537056f9c Mon Sep 17 00:00:00 2001 From: Duncan McClean Date: Tue, 20 Jan 2026 11:50:03 +0000 Subject: [PATCH] Fix error when calculating stack depth for non-existant stack --- resources/js/components/ui/Stack/Stack.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/js/components/ui/Stack/Stack.vue b/resources/js/components/ui/Stack/Stack.vue index 2bdcd223df..8f0c8d88a8 100644 --- a/resources/js/components/ui/Stack/Stack.vue +++ b/resources/js/components/ui/Stack/Stack.vue @@ -57,7 +57,7 @@ const hasStackHeaderComponent = hasComponent('StackHeader', slotProps); const hasStackContentComponent = hasComponent('StackContent', slotProps); const isUsingOpenProp = computed(() => instance?.vnode.props?.hasOwnProperty('open')); const portal = computed(() => stack.value ? `#portal-target-${stack.value.id}` : null); -const depth = computed(() => stacks.stacks().findIndex(s => s.id === stack.value.id) + 1); +const depth = computed(() => stacks.stacks().findIndex(s => s.id === stack.value?.id) + 1); const isTopStack = computed(() => stacks.count() === depth.value); const shouldAddHeader = computed(() => !!(props.title || props.icon) && !hasStackHeaderComponent.value);