File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1909,25 +1909,24 @@ function openReport(params: OpenReportActionParams) {
19091909 } ) ;
19101910 }
19111911
1912- if ( shouldKeepPersonalDetailsOnFailure ) {
1913- failureData . push (
1914- {
1915- onyxMethod : Onyx . METHOD . MERGE ,
1916- key : `${ ONYXKEYS . COLLECTION . REPORT } ${ reportID } ` ,
1917- value : {
1918- errorFields : {
1919- createChat : getMicroSecondOnyxErrorWithTranslationKey ( 'report.genericCreateReportFailureMessage' ) ,
1920- } ,
1912+ if ( ! isNewThread ) {
1913+ failureData . push ( {
1914+ onyxMethod : Onyx . METHOD . MERGE ,
1915+ key : `${ ONYXKEYS . COLLECTION . REPORT } ${ reportID } ` ,
1916+ value : {
1917+ errorFields : {
1918+ createChat : getMicroSecondOnyxErrorWithTranslationKey ( 'report.genericCreateReportFailureMessage' ) ,
19211919 } ,
19221920 } ,
1923- {
1924- onyxMethod : Onyx . METHOD . MERGE ,
1925- key : `${ ONYXKEYS . COLLECTION . REPORT_ACTIONS } ${ reportID } ` ,
1926- value : { [ optimisticCreatedAction . reportActionID ] : { pendingAction : null } } ,
1927- } ,
1928- ) ;
1921+ } ) ;
19291922 }
19301923
1924+ failureData . push ( {
1925+ onyxMethod : Onyx . METHOD . MERGE ,
1926+ key : `${ ONYXKEYS . COLLECTION . REPORT_ACTIONS } ${ reportID } ` ,
1927+ value : { [ optimisticCreatedAction . reportActionID ] : { pendingAction : null } } ,
1928+ } ) ;
1929+
19311930 // Add the createdReportActionID parameter to the API call
19321931 parameters . createdReportActionID = optimisticCreatedAction . reportActionID ;
19331932
You can’t perform that action at this time.
0 commit comments