From 421be6c19ea30f76a4e302af9ea360e9f89b6891 Mon Sep 17 00:00:00 2001 From: qlin Date: Wed, 14 Jun 2023 15:38:38 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"fix:=20=E4=BF=AE=E5=A4=8D=20request?= =?UTF-8?q?=20=E5=88=9D=E5=A7=8B=E5=8C=96=E9=97=AE=E9=A2=98=20(#198)"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit ae412e7308bc39ef78699b0050eb11a41080c56b. --- packages/fes-plugin-request/src/template/request.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/fes-plugin-request/src/template/request.js b/packages/fes-plugin-request/src/template/request.js index 214173c2..c98683ad 100644 --- a/packages/fes-plugin-request/src/template/request.js +++ b/packages/fes-plugin-request/src/template/request.js @@ -15,7 +15,7 @@ function getRequestInstance() { return createRequest(defaultConfig); } -let currentRequest; +const currentRequest = getRequestInstance(); export const rawRequest = (url, data, options = {}) => { if (typeof options === 'string') { @@ -23,9 +23,6 @@ export const rawRequest = (url, data, options = {}) => { method: options, }; } - if (!currentRequest) { - currentRequest = getRequestInstance(); - } return currentRequest(url, data, options); };