Fixed 304 status for fetchJson.

This commit is contained in:
Richard Moore 2020-01-11 20:14:29 -05:00
parent 10943fc3ef
commit c66d81e96f
No known key found for this signature in database
GPG Key ID: 665176BE8E9DC651
1 changed files with 2 additions and 2 deletions

View File

@ -167,14 +167,14 @@ export function fetchJson(connection: string | ConnectionInfo, json?: string, pr
while (true) {
try {
response = await fetch(url, options);
response = await fetch(url, options);
} catch (error) {
console.log(error);
}
body = await response.text();
if (allow304 && response.status === 304) {
// Leave body as null
body = null;
break;
} else if (!response.ok) {