Skip to content

Commit

Permalink
stream: edit variables for readableStreamPipeTo
Browse files Browse the repository at this point in the history
  • Loading branch information
Mert Can Altin committed Nov 8, 2024
1 parent 7788999 commit 9ff094c
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions lib/internal/webstreams/readablestream.js
Original file line number Diff line number Diff line change
Expand Up @@ -371,10 +371,7 @@ class ReadableStream {
// The web platform tests require that these be handled one at a
// time and in a specific order. options can be null or undefined.
validateObject(options, 'options', kValidateObjectAllowObjectsAndNull);
const preventAbort = options?.preventAbort;
const preventCancel = options?.preventCancel;
const preventClose = options?.preventClose;
const signal = options?.signal;
const { preventAbort, preventCancel, preventClose, signal } = options;

if (signal !== undefined) {
validateAbortSignal(signal, 'options.signal');
Expand Down Expand Up @@ -414,10 +411,7 @@ class ReadableStream {
}

validateObject(options, 'options', kValidateObjectAllowObjectsAndNull);
const preventAbort = options?.preventAbort;
const preventCancel = options?.preventCancel;
const preventClose = options?.preventClose;
const signal = options?.signal;
const { preventAbort, preventCancel, preventClose, signal } = options;

if (signal !== undefined) {
validateAbortSignal(signal, 'options.signal');
Expand Down

0 comments on commit 9ff094c

Please sign in to comment.