Skip to content

Commit

Permalink
fix(presentation): remove explicit check for 'r' in perspective
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrobonamin committed Jan 31, 2025
1 parent 4b54d08 commit 10a6ee4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/sanity/src/presentation/PresentationTool.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,13 @@ export default function PresentationTool(props: {
state: PresentationStateParams
}
const routerSearchParams = useUnique(Object.fromEntries(routerState._searchParams || []))
const {perspectiveStack, selectedPerspectiveName = 'previewDrafts'} = usePerspective()
const {
perspectiveStack,
selectedPerspectiveName = 'previewDrafts',
selectedReleaseId,
} = usePerspective()
const perspective = (
selectedPerspectiveName.startsWith('r') ? perspectiveStack : selectedPerspectiveName
selectedReleaseId ? perspectiveStack : selectedPerspectiveName
) as PresentationPerspective

const initialPreviewUrl = usePreviewUrl(
Expand Down

0 comments on commit 10a6ee4

Please sign in to comment.