Skip to content

Commit

Permalink
Fixed 304 status for fetchJson.
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed Jan 12, 2020
1 parent 10943fc commit c66d81e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/web/src.ts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit c66d81e

Please sign in to comment.