Skip to content

Commit

Permalink
removing unneccessary promise step from example
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdavidmills committed Nov 14, 2017
1 parent 626b28f commit 18cdbb8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions streams/simple-pump/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ <h1>Simple Stream Pump</h1>
// Fetch the original image
fetch('./tortoise.png')
// Retrieve its body as ReadableStream
.then(response => response.body)
.then(body => {
const reader = body.getReader();
.then(response => {
const reader = response.body.getReader();

return new ReadableStream({
start(controller) {
Expand Down

0 comments on commit 18cdbb8

Please sign in to comment.