File tree Expand file tree Collapse file tree
src/pages/iou/request/step Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import React from 'react';
22import { useOnyx } from 'react-native-onyx' ;
33import type { ListItem } from '@components/SelectionList/types' ;
44import { changeTransactionsReport , setTransactionReport } from '@libs/actions/Transaction' ;
5+ import getNonEmptyStringOnyxID from '@libs/getNonEmptyStringOnyxID' ;
56import Navigation from '@libs/Navigation/Navigation' ;
67import CONST from '@src/CONST' ;
78import ONYXKEYS from '@src/ONYXKEYS' ;
@@ -22,7 +23,7 @@ type IOURequestStepReportProps = WithWritableReportOrNotFoundProps<typeof SCREEN
2223function IOURequestStepReport ( { route, transaction} : IOURequestStepReportProps ) {
2324 const { backTo, action} = route . params ;
2425 const reportID = transaction ?. reportID === '0' ? transaction ?. participants ?. at ( 0 ) ?. reportID : transaction ?. reportID ;
25- const [ transactionReport ] = useOnyx ( `${ ONYXKEYS . COLLECTION . REPORT } ${ reportID } ` , { canBeMissing : true } ) ;
26+ const [ transactionReport ] = useOnyx ( `${ ONYXKEYS . COLLECTION . REPORT } ${ getNonEmptyStringOnyxID ( reportID ) } ` , { canBeMissing : false } ) ;
2627
2728 const isEditing = action === CONST . IOU . ACTION . EDIT ;
2829
You can’t perform that action at this time.
0 commit comments