Skip to content

Commit bf6ca1f

Browse files
committed
stream: undo internalBinding() conversion in compat mechanism
Refs: nodejs#22675
1 parent 8ce99fa commit bf6ca1f

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

lib/stream.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,10 @@ try {
4949
} else {
5050
// This throws for Node < 4.2.0 because there's no util binding and
5151
// returns undefined for Node < 7.4.0.
52-
Stream._isUint8Array = internalBinding('util').isUint8Array;
52+
// Please do not convert process.binding() to internalBinding() here.
53+
// This is for compatibility with older versions when loaded as
54+
// readable-stream.
55+
Stream._isUint8Array = process.binding('util').isUint8Array;
5356
}
5457
} catch (e) {
5558
}

0 commit comments

Comments
 (0)