Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
stream: rename unknown primordial
Browse files Browse the repository at this point in the history
The primordials does not expose a primordial called `DataViewCtor`,
leading up to a non-existent constructor.

Fixes: nodejs#40612
VoltrexKeyva committed Oct 27, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 9c405f2 commit 5d94d94
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/internal/webstreams/readablestream.js
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ const {
ArrayBufferPrototypeSlice,
ArrayPrototypePush,
ArrayPrototypeShift,
DataViewCtor,
DataView,
FunctionPrototypeBind,
FunctionPrototypeCall,
MathMin,
@@ -2100,7 +2100,7 @@ function readableByteStreamControllerPullInto(
pendingPullIntos,
} = controller[kState];
let elementSize = 1;
let ctor = DataViewCtor;
let ctor = DataView;
if (isArrayBufferView(view) && !isDataView(view)) {
elementSize = view.constructor.BYTES_PER_ELEMENT;
ctor = view.constructor;

0 comments on commit 5d94d94

Please sign in to comment.