File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -483,10 +483,9 @@ function goUp(backToRoute: Route, options?: GoBackOptions) {
483483 return ;
484484 }
485485
486- // For TAB_NAVIGATOR targets, use POP_TO so the underlying tab's nested state is restored from the
487- // payload — plain pop can leave the active tab pointing at Home instead of the intended target.
488- // Issue: https://github.com/Expensify/App/issues/89006
489- if ( ( minimalAction . payload as { name ?: string } | undefined ) ?. name === NAVIGATORS . TAB_NAVIGATOR ) {
486+ // For TAB_NAVIGATOR targets, POP_TO restores nested state from the payload (#89006). Skip when
487+ // there's nothing to pop — POP_TO would otherwise pop to an older matching route (#89209).
488+ if ( distanceToPop > 0 && ( minimalAction . payload as { name ?: string } | undefined ) ?. name === NAVIGATORS . TAB_NAVIGATOR ) {
490489 navigationRef . current . dispatch ( { ...minimalAction , type : CONST . NAVIGATION . ACTION_TYPE . POP_TO , target : targetState . key } ) ;
491490 return ;
492491 }
You can’t perform that action at this time.
0 commit comments