Skip to content

Commit 2f36c16

Browse files
authored
Merge pull request GoogleChromeLabs#83 from oliverdunk/bug/tweet-path
Actually prevent non 200 responses.
2 parents aedd704 + f8b2cbf commit 2f36c16

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

stream-progress/stream.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ fetch('./tweets.json')
7575

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

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

0 commit comments

Comments
 (0)