Skip to content

Commit

Permalink
fix(taro): interceptor 暴露 request 返回的 requestTask。close #3654
Browse files Browse the repository at this point in the history
  • Loading branch information
Chen-jj committed Jul 8, 2019
1 parent 0ecb399 commit 2ada5a2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/taro/src/interceptor/chain.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ export default class Chain {
}
const nextInterceptor = this._getNextInterceptor()
const nextChain = this._getNextChain()
return nextInterceptor(nextChain).catch(err => Promise.reject(err))
const p = nextInterceptor(nextChain)
const res = p.catch(err => Promise.reject(err))
if (typeof p.abort === 'function') res.abort = p.abort
return res
}

_getNextInterceptor () {
Expand Down

0 comments on commit 2ada5a2

Please sign in to comment.