stream: undo internalBinding() conversion in compat mechanism
PR-URL: https://github.com/nodejs/node/pull/23662 Refs: https://github.com/nodejs/node/pull/22675 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
parent
c1b9be53c8
commit
4e9e0d339e
@ -49,7 +49,10 @@ try {
|
||||
} else {
|
||||
// This throws for Node < 4.2.0 because there's no util binding and
|
||||
// returns undefined for Node < 7.4.0.
|
||||
Stream._isUint8Array = internalBinding('util').isUint8Array;
|
||||
// Please do not convert process.binding() to internalBinding() here.
|
||||
// This is for compatibility with older versions when loaded as
|
||||
// readable-stream.
|
||||
Stream._isUint8Array = process.binding('util').isUint8Array;
|
||||
}
|
||||
} catch (e) {
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user