Skip to content

Commit

Permalink
Merge pull request #28810 from shubham1206agra/fix-persisted-requests
Browse files Browse the repository at this point in the history
Fix: RBR - Deleted error notifications reappear after reloading
  • Loading branch information
mountiny authored Oct 6, 2023
2 parents 5fcdfd9 + ae8cb00 commit c5e1049
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libs/actions/PersistedRequests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ function remove(requestToRemove: Request) {
* We only remove the first matching request because the order of requests matters.
* If we were to remove all matching requests, we can end up with a final state that is different than what the user intended.
*/
const index = persistedRequests.findIndex((persistedRequest) => isEqual(persistedRequest, requestToRemove));
const requests = [...persistedRequests];
const index = requests.findIndex((persistedRequest) => isEqual(persistedRequest, requestToRemove));
if (index === -1) {
return;
}
const requests = [...persistedRequests];
requests.splice(index, 1);
persistedRequests = requests;
Onyx.set(ONYXKEYS.PERSISTED_REQUESTS, requests);
Expand Down

0 comments on commit c5e1049

Please sign in to comment.