File tree 1 file changed +2
-5
lines changed
1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,6 @@ const internalUtil = require('internal/util');
56
56
internalUtil . assertCrypto ( ) ;
57
57
const {
58
58
isArrayBufferView,
59
- isDataView,
60
59
isUint8Array,
61
60
} = require ( 'internal/util/types' ) ;
62
61
@@ -148,16 +147,14 @@ exports.convertALPNProtocols = function convertALPNProtocols(protocols, out) {
148
147
// If protocols is Array - translate it into buffer
149
148
if ( ArrayIsArray ( protocols ) ) {
150
149
out . ALPNProtocols = convertProtocols ( protocols ) ;
151
- } else if ( Buffer . isBuffer ( protocols ) || isUint8Array ( protocols ) ) {
150
+ } else if ( isUint8Array ( protocols ) ) {
152
151
// Copy new buffer not to be modified by user.
153
152
out . ALPNProtocols = Buffer . from ( protocols ) ;
154
- } else if ( isDataView ( protocols ) ) {
153
+ } else if ( isArrayBufferView ( protocols ) ) {
155
154
out . ALPNProtocols = Buffer . from ( protocols . buffer . slice (
156
155
protocols . byteOffset ,
157
156
protocols . byteOffset + protocols . byteLength
158
157
) ) ;
159
- } else if ( isArrayBufferView ( protocols ) ) {
160
- out . ALPNProtocols = Buffer . from ( protocols . slice ( ) . buffer ) ;
161
158
}
162
159
} ;
163
160
You can’t perform that action at this time.
0 commit comments