File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4021,7 +4021,8 @@ function canEditFieldOfMoneyRequest(reportAction: OnyxInputOrEntry<ReportAction>
40214021 }
40224022
40234023 if ( fieldToEdit === CONST . EDIT_REQUEST_FIELD . REPORT ) {
4024- const isUnreported = ! moneyRequestReport || isEmptyObject ( moneyRequestReport ) ;
4024+ // Unreported transaction from OldDot can have the reportID as an empty string
4025+ const isUnreported = ! transaction ?. reportID || transaction ?. reportID === CONST . REPORT . UNREPORTED_REPORT_ID ;
40254026 return isUnreported
40264027 ? Object . values ( allPolicies ?? { } ) . flatMap ( ( currentPolicy ) => getOutstandingReportsForUser ( currentPolicy ?. id , currentUserAccountID , allReports ?? { } ) ) . length > 0
40274028 : getOutstandingReportsForUser ( moneyRequestReport ?. policyID , moneyRequestReport ?. ownerAccountID , allReports ?? { } ) . length > 1 ;
You can’t perform that action at this time.
0 commit comments