From 5029f33f05b75d82253883a51853c4331742e836 Mon Sep 17 00:00:00 2001 From: Daniel Silva Date: Fri, 15 Sep 2023 14:15:16 +0800 Subject: [PATCH] fixing clause, adding OR and unpausing sequential queue --- src/libs/actions/OnyxUpdateManager.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libs/actions/OnyxUpdateManager.js b/src/libs/actions/OnyxUpdateManager.js index 209b095550cb..e0f3f8fd4622 100644 --- a/src/libs/actions/OnyxUpdateManager.js +++ b/src/libs/actions/OnyxUpdateManager.js @@ -42,10 +42,11 @@ export default () => { if ( !_.isObject(val) || !_.has(val, 'type') || - !(val.type === CONST.ONYX_UPDATE_TYPES.HTTPS && _.has(val, 'request') && _.has(val, 'response')) && - !(val.type === CONST.ONYX_UPDATE_TYPES.PUSHER && _.has(val, 'updates')) + (!(val.type === CONST.ONYX_UPDATE_TYPES.HTTPS && _.has(val, 'request') && _.has(val, 'response')) && !(val.type === CONST.ONYX_UPDATE_TYPES.PUSHER && _.has(val, 'updates'))) ) { + console.debug('[OnyxUpdateManager] Invalid format found for updates, cleaning and unpausing the queue'); Onyx.set(ONYXKEYS.ONYX_UPDATES_FROM_SERVER, null); + SequentialQueue.unpause(); return; }