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); };