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
@@ -148,16 +147,14 @@ exports.convertALPNProtocols = function convertALPNProtocols(protocols, out) {
148147 // If protocols is Array - translate it into buffer
149148 if ( ArrayIsArray ( protocols ) ) {
150149 out . ALPNProtocols = convertProtocols ( protocols ) ;
151- } else if ( Buffer . isBuffer ( protocols ) || isUint8Array ( protocols ) ) {
150+ } else if ( isUint8Array ( protocols ) ) {
152151 // Copy new buffer not to be modified by user.
153152 out . ALPNProtocols = Buffer . from ( protocols ) ;
154- } else if ( isDataView ( protocols ) ) {
153+ } else if ( isArrayBufferView ( protocols ) ) {
155154 out . ALPNProtocols = Buffer . from ( protocols . buffer . slice (
156155 protocols . byteOffset ,
157156 protocols . byteOffset + protocols . byteLength
158157 ) ) ;
159- } else if ( isArrayBufferView ( protocols ) ) {
160- out . ALPNProtocols = Buffer . from ( protocols . slice ( ) . buffer ) ;
161158 }
162159} ;
163160
You can’t perform that action at this time.
0 commit comments