File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Expand file tree Collapse file tree 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
@@ -147,16 +146,14 @@ exports.convertALPNProtocols = function convertALPNProtocols(protocols, out) {
147
146
// If protocols is Array - translate it into buffer
148
147
if ( ArrayIsArray ( protocols ) ) {
149
148
out . ALPNProtocols = convertProtocols ( protocols ) ;
150
- } else if ( Buffer . isBuffer ( protocols ) || isUint8Array ( protocols ) ) {
149
+ } else if ( isUint8Array ( protocols ) ) {
151
150
// Copy new buffer not to be modified by user.
152
151
out . ALPNProtocols = Buffer . from ( protocols ) ;
153
- } else if ( isDataView ( protocols ) ) {
152
+ } else if ( isArrayBufferView ( protocols ) ) {
154
153
out . ALPNProtocols = Buffer . from ( protocols . buffer . slice (
155
154
protocols . byteOffset ,
156
155
protocols . byteOffset + protocols . byteLength
157
156
) ) ;
158
- } else if ( isArrayBufferView ( protocols ) ) {
159
- out . ALPNProtocols = Buffer . from ( protocols . slice ( ) . buffer ) ;
160
157
}
161
158
} ;
162
159
You can’t perform that action at this time.
0 commit comments