Skip to content

Commit 02807b6

Browse files
author
Chau Giang
authored
fix: remove optional chainning for compatible with Nodejs12 and below (#2470)
1 parent 286bb44 commit 02807b6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/api/readable.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ module.exports = class BodyReadable extends Readable {
180180
this
181181
.on('close', function () {
182182
signalListenerCleanup()
183-
if (signal?.aborted) {
183+
if (signal && signal.aborted) {
184184
reject(signal.reason || Object.assign(new Error('The operation was aborted'), { name: 'AbortError' }))
185185
} else {
186186
resolve(null)

0 commit comments

Comments
 (0)