Fix infinite request spinner when cancelling "Send and Download" (#2721)

We were hiding the spinner at the end of the _handleSendAndDownloadRequestWithEnvironment method. However, we
were exiting early we the user cancel the save dialog (L672).

To prevent that, I've moved the code in a finally block, therefore we make sure that the spinner will be hidden

Closes #2718
This commit is contained in:
Julien Giovaresco 2020-10-20 08:45:48 +02:00 committed by GitHub
parent 27d5881684
commit ceead25167
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -713,15 +713,15 @@ class App extends PureComponent {
</div>
),
});
} finally {
// Unset active response because we just made a new one
await App._updateRequestMetaByParentId(requestId, {
activeResponseId: null,
});
// Stop loading
handleStopLoading(requestId);
}
// Unset active response because we just made a new one
await App._updateRequestMetaByParentId(requestId, {
activeResponseId: null,
});
// Stop loading
handleStopLoading(requestId);
}
async _handleSendRequestWithEnvironment(requestId, environmentId) {