Skip to content

Commit

Permalink
Make @@asyncIterator non-enumerable
Browse files Browse the repository at this point in the history
  • Loading branch information
MattiasBuelens committed Jan 29, 2019
1 parent 3e77ea5 commit f1d85b9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion reference-implementation/lib/readable-stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,12 @@ const ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf({
}
}, AsyncIteratorPrototype);

ReadableStream.prototype[Symbol.asyncIterator] = ReadableStream.prototype.getIterator;
Object.defineProperty(ReadableStream.prototype, Symbol.asyncIterator, {
value: ReadableStream.prototype.getIterator,
enumerable: false,
writable: true,
configurable: true
});

module.exports = {
CreateReadableByteStream,
Expand Down

0 comments on commit f1d85b9

Please sign in to comment.