@@ -35,7 +35,7 @@ function destroy(err, cb) {
35
35
// With duplex streams we use the writable side for state.
36
36
const s = w || r ;
37
37
38
- if ( ( w && w . destroyed ) || ( r && r . destroyed ) ) {
38
+ if ( w ? .destroyed || r ? .destroyed ) {
39
39
if ( typeof cb === 'function' ) {
40
40
cb ( ) ;
41
41
}
@@ -134,7 +134,7 @@ function emitCloseNT(self) {
134
134
r . closeEmitted = true ;
135
135
}
136
136
137
- if ( ( w && w . emitClose ) || ( r && r . emitClose ) ) {
137
+ if ( w ? .emitClose || r ? .emitClose ) {
138
138
self . emit ( 'close' ) ;
139
139
}
140
140
}
@@ -143,7 +143,7 @@ function emitErrorNT(self, err) {
143
143
const r = self . _readableState ;
144
144
const w = self . _writableState ;
145
145
146
- if ( ( w && w . errorEmitted ) || ( r && r . errorEmitted ) ) {
146
+ if ( w ? .errorEmitted || r ? .errorEmitted ) {
147
147
return ;
148
148
}
149
149
@@ -198,11 +198,11 @@ function errorOrDestroy(stream, err, sync) {
198
198
const r = stream . _readableState ;
199
199
const w = stream . _writableState ;
200
200
201
- if ( ( w && w . destroyed ) || ( r && r . destroyed ) ) {
201
+ if ( w ? .destroyed || r ? .destroyed ) {
202
202
return this ;
203
203
}
204
204
205
- if ( ( r && r . autoDestroy ) || ( w && w . autoDestroy ) )
205
+ if ( r ? .autoDestroy || w ? .autoDestroy )
206
206
stream . destroy ( err ) ;
207
207
else if ( err ) {
208
208
// Avoid V8 leak, https://github.com/nodejs/node/pull/34103#issuecomment-652002364
@@ -306,7 +306,7 @@ function emitConstructNT(stream) {
306
306
}
307
307
308
308
function isRequest ( stream ) {
309
- return stream && stream . setHeader && typeof stream . abort === 'function' ;
309
+ return stream ? .setHeader && typeof stream . abort === 'function' ;
310
310
}
311
311
312
312
// Normalize destroy for legacy.
0 commit comments