Skip to content

Commit b631c28

Browse files
committed
Be explicit about converting a chunk to a string in Chapter 20
1 parent 2541191 commit b631c28

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

20_node.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1086,7 +1086,7 @@ the first argument to the callback:
10861086
function readStreamAsString(stream, callback) {
10871087
var data = "";
10881088
stream.on("data", function(chunk) {
1089-
data += chunk;
1089+
data += chunk.toString();
10901090
});
10911091
stream.on("end", function() {
10921092
callback(null, data);

0 commit comments

Comments
 (0)