diff --git a/src/libs/Middleware/SaveResponseInOnyx.js b/src/libs/Middleware/SaveResponseInOnyx.js index 5c096bf3da72..c866a797877e 100644 --- a/src/libs/Middleware/SaveResponseInOnyx.js +++ b/src/libs/Middleware/SaveResponseInOnyx.js @@ -15,11 +15,7 @@ const requestsToIgnoreLastUpdateID = ['OpenApp', 'ReconnectApp', 'GetMissingOnyx */ function SaveResponseInOnyx(requestResponse, request) { return requestResponse - .then((response) => { - // Make sure we have response data (i.e. response isn't a promise being passed down to us by a failed retry request and response undefined) - if (!response) { - return; - } + .then((response = {}) => { const onyxUpdates = response.onyxData; // Sometimes we call requests that are successfull but they don't have any response or any success/failure data to set. Let's return early since