Skip to content

Commit

Permalink
Actually prevent non 200 responses.
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverdunk committed May 19, 2017
1 parent 4b87dc6 commit f8b2cbf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions stream-progress/stream.js
Expand Up @@ -75,6 +75,7 @@ fetch('./tweets.json')

if (resp.status != 200) {
//Don't try to parse non JSON responses, such as a 404 error...
return;
}

const bytesTotal = parseInt(resp.headers.get('Content-Length'), 10);
Expand Down

0 comments on commit f8b2cbf

Please sign in to comment.