diff --git a/src/libs/Navigation/linkTo.ts b/src/libs/Navigation/linkTo.ts index 863cb102add4..4bddbaf044e7 100644 --- a/src/libs/Navigation/linkTo.ts +++ b/src/libs/Navigation/linkTo.ts @@ -1,5 +1,6 @@ import {getActionFromState} from '@react-navigation/core'; import type {NavigationAction, NavigationContainerRef, NavigationState, PartialState} from '@react-navigation/native'; +import {omitBy} from 'lodash'; import type {Writable} from 'type-fest'; import getIsNarrowLayout from '@libs/getIsNarrowLayout'; import shallowCompare from '@libs/ObjectUtils'; @@ -153,8 +154,10 @@ export default function linkTo(navigation: NavigationContainerRef value === undefined), + omitBy(action.payload.params?.params, (value) => value === undefined), + ); // In case if type is 'FORCED_UP' we replace current screen with the provided. This means the current screen no longer exists in the stack if (type === CONST.NAVIGATION.TYPE.FORCED_UP) { action.type = CONST.NAVIGATION.ACTION_TYPE.REPLACE;