Skip to content

Commit

Permalink
fix: tab redirect stuck in a loop (#27156)
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldambra authored Jan 5, 2025
1 parent c4cbff4 commit 7ececc4
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,13 @@ export const sessionReplaySceneLogic = kea<sessionReplaySceneLogicType>([
urlToAction(({ actions, values }) => {
return {
'/replay/:tab': ({ tab }) => {
if (tab !== values.tab) {
actions.setTab(tab as ReplayTabs)
// we saw a page get stuck in a redirect loop between recent and home
// see https://posthog.sentry.io/issues/6176801992/?notification_uuid=093e1a3f-c266-4c17-9610-68816996d304&project=1899813&referrer=assigned_activity-email
// so, we're extra careful that the value being set is a valid tab
const candidateTab = tab as ReplayTabs
const validTab = Object.values(ReplayTabs).includes(candidateTab) ? candidateTab : ReplayTabs.Home
if (validTab !== values.tab) {
actions.setTab(validTab)
}
},
}
Expand Down

0 comments on commit 7ececc4

Please sign in to comment.