From 38f5cad3e1ee32426d77f08f4af1401a4e34bdaf Mon Sep 17 00:00:00 2001 From: Amir Hasanzade Date: Mon, 16 May 2022 03:12:20 -0700 Subject: [PATCH] Update about.md (change "data" field to "value") The object returned from "await stream.read()" has two fields: "done" and "value", and not the "data" field destructured here. --- 4-binary/03-blob/article.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/4-binary/03-blob/article.md b/4-binary/03-blob/article.md index 41ad4b36..fc015057 100644 --- a/4-binary/03-blob/article.md +++ b/4-binary/03-blob/article.md @@ -237,8 +237,8 @@ const readableStream = blob.stream(); const stream = readableStream.getReader(); while (true) { - // for each iteration: data is the next blob fragment - let { done, data } = await stream.read(); + // for each iteration: value is the next blob fragment + let { done, value } = await stream.read(); if (done) { // no more data in the stream console.log('all blob processed.'); @@ -246,7 +246,7 @@ while (true) { } // do something with the data portion we've just read from the blob - console.log(data); + console.log(value); } ```