@@ -35,7 +35,7 @@ function destroy(err, cb){
3535// With duplex streams we use the writable side for state.
3636const s = w || r ;
3737
38- if ( ( w && w . destroyed ) || ( r && r . destroyed ) ) {
38+ if ( w ? .destroyed || r ? .destroyed ) {
3939if ( typeof cb === 'function' ) {
4040cb ( ) ;
4141}
@@ -134,7 +134,7 @@ function emitCloseNT(self){
134134r . closeEmitted = true ;
135135}
136136
137- if ( ( w && w . emitClose ) || ( r && r . emitClose ) ) {
137+ if ( w ? .emitClose || r ? .emitClose ) {
138138self . emit ( 'close' ) ;
139139}
140140}
@@ -143,7 +143,7 @@ function emitErrorNT(self, err){
143143const r = self . _readableState ;
144144const w = self . _writableState ;
145145
146- if ( ( w && w . errorEmitted ) || ( r && r . errorEmitted ) ) {
146+ if ( w ? .errorEmitted || r ? .errorEmitted ) {
147147return ;
148148}
149149
@@ -198,11 +198,11 @@ function errorOrDestroy(stream, err, sync){
198198const r = stream . _readableState ;
199199const w = stream . _writableState ;
200200
201- if ( ( w && w . destroyed ) || ( r && r . destroyed ) ) {
201+ if ( w ? .destroyed || r ? .destroyed ) {
202202return this ;
203203}
204204
205- if ( ( r && r . autoDestroy ) || ( w && w . autoDestroy ) )
205+ if ( r ? .autoDestroy || w ? .autoDestroy )
206206stream . destroy ( err ) ;
207207else if ( err ) {
208208// Avoid V8 leak, https://github.com/nodejs/node/pull/34103#issuecomment-652002364
@@ -306,7 +306,7 @@ function emitConstructNT(stream){
306306}
307307
308308function isRequest ( stream ) {
309- return stream && stream . setHeader && typeof stream . abort === 'function' ;
309+ return stream ? .setHeader && typeof stream . abort === 'function' ;
310310}
311311
312312// Normalize destroy for legacy.
0 commit comments