Skip to content

Commit

Permalink
Fix #1465
Browse files Browse the repository at this point in the history
  • Loading branch information
delvedor committed Oct 29, 2021
1 parent bb0c3f5 commit 5269376
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions lib/Transport.js
Expand Up @@ -171,10 +171,14 @@ class Transport {
let request = { abort: noop }
const transportReturn = {
then (onFulfilled, onRejected) {
return p.then(onFulfilled, onRejected)
if (p != null) {
return p.then(onFulfilled, onRejected)
}
},
catch (onRejected) {
return p.catch(onRejected)
if (p != null) {
return p.catch(onRejected)
}
},
abort () {
meta.aborted = true
Expand All @@ -183,7 +187,9 @@ class Transport {
return this
},
finally (onFinally) {
return p.finally(onFinally)
if (p != null) {
return p.finally(onFinally)
}
}
}

Expand Down

0 comments on commit 5269376

Please sign in to comment.