Skip to content

Commit

Permalink
Merge requests params
Browse files Browse the repository at this point in the history
  • Loading branch information
WojtekBoman committed Oct 31, 2023
1 parent b37e1ba commit f214161
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/libs/actions/PersistedRequests.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {merge} from 'lodash';
import isEqual from 'lodash/isEqual';
import Onyx, {OnyxUpdate} from 'react-native-onyx';
import ONYXKEYS from '@src/ONYXKEYS';
Expand Down Expand Up @@ -33,6 +34,7 @@ function mergeOnyxUpdateData(oldData: OnyxUpdate[] = [], newData: OnyxUpdate[] =

function createUpdatedRequest(oldRequest: Request, newRequest: Request): Request {
const updatedRequest = {
data: merge({...oldRequest.data}, newRequest.data),
failureData: mergeOnyxUpdateData(oldRequest.failureData, newRequest.failureData),
successData: mergeOnyxUpdateData(oldRequest.successData, newRequest.successData),
...newRequest,
Expand Down

0 comments on commit f214161

Please sign in to comment.