Skip to content

Commit 70a958d

Browse files
committed
fix index finding
1 parent 4670057 commit 70a958d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/libs/Navigation/helpers/navigateToWorkspacesPage.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ const navigateToWorkspacesPage = ({currentUserLogin, shouldUseNarrowLayout, poli
5757
// https://github.com/Expensify/App/issues/89009
5858
if (rootState) {
5959
const topRootIndex = rootState.index ?? rootState.routes.length - 1;
60-
const olderTabIdx = rootState.routes.findIndex((route, idx) => {
60+
const olderTabIdx = rootState.routes.findLastIndex((route, idx) => {
6161
if (idx >= topRootIndex || route.name !== NAVIGATORS.TAB_NAVIGATOR) {
6262
return false;
6363
}

0 commit comments

Comments
 (0)