From 2ada5a2188302705b3b67608392d90dac0950c1d Mon Sep 17 00:00:00 2001 From: chenjiajian <798095202@qq.com> Date: Mon, 8 Jul 2019 15:11:39 +0800 Subject: [PATCH] =?UTF-8?q?fix(taro):=20interceptor=20=E6=9A=B4=E9=9C=B2?= =?UTF-8?q?=20request=20=E8=BF=94=E5=9B=9E=E7=9A=84=20requestTask=E3=80=82?= =?UTF-8?q?close=20#3654?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/taro/src/interceptor/chain.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/taro/src/interceptor/chain.js b/packages/taro/src/interceptor/chain.js index dc959849bfce..fee90abc9a71 100644 --- a/packages/taro/src/interceptor/chain.js +++ b/packages/taro/src/interceptor/chain.js @@ -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 () {