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');
5656internalUtil . assertCrypto ( ) ;
5757const {
5858 isArrayBufferView,
59- isDataView,
6059 isUint8Array,
6160} = require ( 'internal/util/types' ) ;
6261
@@ -149,16 +148,14 @@ exports.convertALPNProtocols = function convertALPNProtocols(protocols, out) {
149148 // If protocols is Array - translate it into buffer
150149 if ( ArrayIsArray ( protocols ) ) {
151150 out . ALPNProtocols = convertProtocols ( protocols ) ;
152- } else if ( Buffer . isBuffer ( protocols ) || isUint8Array ( protocols ) ) {
151+ } else if ( isUint8Array ( protocols ) ) {
153152 // Copy new buffer not to be modified by user.
154153 out . ALPNProtocols = Buffer . from ( protocols ) ;
155- } else if ( isDataView ( protocols ) ) {
154+ } else if ( isArrayBufferView ( protocols ) ) {
156155 out . ALPNProtocols = Buffer . from ( protocols . buffer . slice (
157156 protocols . byteOffset ,
158157 protocols . byteOffset + protocols . byteLength
159158 ) ) ;
160- } else if ( isArrayBufferView ( protocols ) ) {
161- out . ALPNProtocols = Buffer . from ( protocols . slice ( ) . buffer ) ;
162159 }
163160} ;
164161
You can’t perform that action at this time.
0 commit comments