Skip to content

Commit

Permalink
fix UT for real
Browse files Browse the repository at this point in the history
  • Loading branch information
atlowChemi committed Jul 27, 2023
1 parent b2feb19 commit 479c99d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/api/readable.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,10 @@ module.exports = class BodyReadable extends Readable {
} catch {
util.throwIfAborted(signal)
} finally {
if (signalListenerCleanup) {
if (typeof signalListenerCleanup === 'function') {
signalListenerCleanup()
} else if (signalListenerCleanup) {
signalListenerCleanup[Symbol.dispose]()
}
}
}
Expand Down

0 comments on commit 479c99d

Please sign in to comment.