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

(cherry picked from commit 0a5d56e)
  • Loading branch information
mountiny authored and OSBotify committed Sep 19, 2023
1 parent ea0c070 commit 20ccdab
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 20ccdab

Please sign in to comment.