Skip to content

Commit

Permalink
Merge pull request #27760 from Expensify/dsilva_solveIssueWithOnyxTSM…
Browse files Browse the repository at this point in the history
…igration

[CP Staging] Adding OR check on lastUpdateID
  • Loading branch information
mountiny authored Sep 19, 2023
2 parents e90b043 + 80c2495 commit 0a5d56e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libs/actions/OnyxUpdates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ function apply({lastUpdateID, type, request, response, updates}: OnyxUpdatesFrom
console.debug('[OnyxUpdateManager] Update received was older than current state, returning without applying the updates');
return Promise.resolve();
}
if (lastUpdateID && lastUpdateIDAppliedToClient && Number(lastUpdateID) > lastUpdateIDAppliedToClient) {
if (lastUpdateID && (lastUpdateIDAppliedToClient === null || Number(lastUpdateID) > lastUpdateIDAppliedToClient)) {
Onyx.merge(ONYXKEYS.ONYX_UPDATES_LAST_UPDATE_ID_APPLIED_TO_CLIENT, Number(lastUpdateID));
}
if (type === CONST.ONYX_UPDATE_TYPES.HTTPS && request && response) {
Expand Down

0 comments on commit 0a5d56e

Please sign in to comment.