Skip to content
Snippets Groups Projects
Unverified Commit 5d346282 authored by Cam Saul's avatar Cam Saul
Browse files

Merge branch 'master' into include-root-collection-in-collections-list-endpoint

parents 65344a05 c33b78b0
No related branches found
No related tags found
No related merge requests found
......@@ -80,7 +80,7 @@ const QuestionEmptyState = () => (
<Box>
<Icon name="beaker" size={32} />
</Box>
<h3>{t`Quesitons are a saved look at your data.`}</h3>
<h3>{t`Questions are a saved look at your data.`}</h3>
</EmptyStateWrapper>
);
......
......@@ -668,6 +668,14 @@ api._makeRequest = async (method, url, headers, requestBody, data, options) => {
? { status: 0, responseText: "" }
: await fetch(api.basename + url, fetchOptions);
if (!window.document) {
console.warn(
"API request completed after test ended. Ignoring result.",
url,
);
return;
}
if (isCancelled) {
throw { status: 0, data: "", isCancelled: true };
}
......@@ -710,6 +718,16 @@ api._makeRequest = async (method, url, headers, requestBody, data, options) => {
throw error;
}
} catch (e) {
if (!window.document) {
console.warn(
"API request failed after test ended. Ignoring result.",
url,
e,
);
return;
}
throw e;
} finally {
pendingRequests--;
if (pendingRequests === 0 && pendingRequestsDeferred) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment