diff options
Diffstat (limited to 'src/bun.js/builtins/js')
-rw-r--r-- | src/bun.js/builtins/js/ReadableStream.js | 10 | ||||
-rw-r--r-- | src/bun.js/builtins/js/ReadableStreamInternals.js | 1 |
2 files changed, 2 insertions, 9 deletions
diff --git a/src/bun.js/builtins/js/ReadableStream.js b/src/bun.js/builtins/js/ReadableStream.js index 8020b024d..fb4327ec8 100644 --- a/src/bun.js/builtins/js/ReadableStream.js +++ b/src/bun.js/builtins/js/ReadableStream.js @@ -446,10 +446,7 @@ function locked() function values(options) { "use strict"; - var prototype = this?.constructor?.prototype; - if (!prototype) { - return @undefined; - } + var prototype = @ReadableStream.prototype; @readableStreamDefineLazyIterators(prototype); return prototype.values.@call(this, options); } @@ -457,10 +454,7 @@ function values(options) { @linkTimeConstant function lazyAsyncIterator() { "use strict"; - var prototype = this?.constructor?.prototype; - if (!prototype) { - return @undefined; - } + var prototype = @ReadableStream.prototype; @readableStreamDefineLazyIterators(prototype); return prototype[globalThis.Symbol.asyncIterator].@call(this); }
\ No newline at end of file diff --git a/src/bun.js/builtins/js/ReadableStreamInternals.js b/src/bun.js/builtins/js/ReadableStreamInternals.js index ca1edaee8..c6115a456 100644 --- a/src/bun.js/builtins/js/ReadableStreamInternals.js +++ b/src/bun.js/builtins/js/ReadableStreamInternals.js @@ -2154,7 +2154,6 @@ function readableStreamDefineLazyIterators(prototype) { } } }; - var createAsyncIterator = function asyncIterator() { return ReadableStreamAsyncIterator(this, false); }; |