Skip to content

Commit 9be2cd4

Browse files
committed
fix: Fix logic in span detail back
Fixes the inversed logic from #701
1 parent 9ca9ed1 commit 9be2cd4

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.changeset/old-fans-brake.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
'@spotlightjs/spotlight': patch
3+
'@spotlightjs/electron': patch
4+
'@spotlightjs/overlay': patch
5+
'@spotlightjs/astro': patch
6+
---
7+
8+
Fix span details modal resetting trace view tree state on close (for reals this time)

packages/overlay/src/ui/SidePanel/SidePanel.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export type SidePanelProps = Omit<ComponentPropsWithoutRef<'div'>, 'className'>
1010
export function useGoBackWithFallback(fallback: string) {
1111
const navigateTo = useNavigate();
1212
const loc = useLocation();
13-
return () => (loc.key === 'default' ? navigateTo(-1) : navigateTo(fallback, { replace: true }));
13+
return () => (loc.key === 'default' ? navigateTo(fallback, { replace: true }) : navigateTo(-1));
1414
}
1515

1616
export function SidePanelHeader({

0 commit comments

Comments
 (0)