Skip to content

Commit

Permalink
revert change directly
Browse files Browse the repository at this point in the history
  • Loading branch information
namhihi237 committed Jul 13, 2023
1 parent a52c6d5 commit 46595c3
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/libs/actions/PersistedRequests.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,12 @@ function save(requestsToPersist) {
* @param {Object} requestToRemove
*/
function remove(requestToRemove) {
const persistedRequestsCopy = _.clone(persistedRequests);
const index = _.findIndex(persistedRequestsCopy, (persistedRequest) => _.isEqual(persistedRequest, requestToRemove));
const index = _.findIndex(persistedRequests, (persistedRequest) => _.isEqual(persistedRequest, requestToRemove));
if (index !== -1) {
persistedRequestsCopy.splice(index, 1);
persistedRequests = persistedRequestsCopy;
persistedRequests.splice(index, 1);
}

Onyx.set(ONYXKEYS.PERSISTED_REQUESTS, persistedRequestsCopy);
Onyx.set(ONYXKEYS.PERSISTED_REQUESTS, persistedRequests);
}

/**
Expand Down

0 comments on commit 46595c3

Please sign in to comment.