diff options
| author | 2022-10-03 01:07:54 -0700 | |
|---|---|---|
| committer | 2022-10-03 01:07:54 -0700 | |
| commit | 08d606c3d7ff5accd881b016d51291af54164f06 (patch) | |
| tree | 379ef953e67832fbc34017abbf5257bdbfd0bfef /src/bun.js/builtins/js/WritableStreamInternals.js | |
| parent | ed82b919a03d9044cb106401030eecf11dc2db81 (diff) | |
| download | bun-08d606c3d7ff5accd881b016d51291af54164f06.tar.gz bun-08d606c3d7ff5accd881b016d51291af54164f06.tar.zst bun-08d606c3d7ff5accd881b016d51291af54164f06.zip | |
Fix undefined is not a function error in WritableStream
Diffstat (limited to 'src/bun.js/builtins/js/WritableStreamInternals.js')
| -rw-r--r-- | src/bun.js/builtins/js/WritableStreamInternals.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/bun.js/builtins/js/WritableStreamInternals.js b/src/bun.js/builtins/js/WritableStreamInternals.js index 5a97155f2..58c4ee87c 100644 --- a/src/bun.js/builtins/js/WritableStreamInternals.js +++ b/src/bun.js/builtins/js/WritableStreamInternals.js @@ -714,10 +714,12 @@ function writableStreamDefaultControllerAdvanceQueueIfNeeded(controller) return; } - if (@getByIdDirectPrivate(controller, "queue").content?.isEmpty() ?? false) + const queue = @getByIdDirectPrivate(controller, "queue"); + + if (queue.content?.isEmpty() ?? false) return; - const value = @peekQueueValue(@getByIdDirectPrivate(controller, "queue")); + const value = @peekQueueValue(queue); if (value === @isCloseSentinel) @writableStreamDefaultControllerProcessClose(controller); else |
