Skip to content

Commit fc4ec0f

Browse files
malwilleyandrewshie-sentry
authored andcommitted
fix(releases): Redirect to normalized path when project query param does not exist (#87600)
If you go to the release details page, remove the `?project=id` param and reload the page, you will get redirected to a route with `/organizations/:orgSlug/` prepended. This is solved by normalizing `nextPath`.
1 parent 79acaae commit fc4ec0f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

static/app/views/releases/detail/index.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -319,9 +319,10 @@ function ReleasesDetailContainer(props: ReleasesDetailContainerProps) {
319319
}))}
320320
router={router}
321321
nextPath={{
322-
pathname: `/organizations/${organization.slug}/releases/${encodeURIComponent(
323-
release!
324-
)}/`,
322+
pathname: makeReleasesPathname({
323+
path: `/${encodeURIComponent(release!)}/`,
324+
organization,
325+
}),
325326
}}
326327
noProjectRedirectPath={makeReleasesPathname({
327328
organization,

0 commit comments

Comments
 (0)