Skip to content

Commit

Permalink
Revert "fix: 修复 request 初始化问题 (#198)"
Browse files Browse the repository at this point in the history
This reverts commit ae412e7.
  • Loading branch information
winixt authored Jun 14, 2023
1 parent 68e15ad commit 421be6c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions packages/fes-plugin-request/src/template/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,14 @@ function getRequestInstance() {
return createRequest(defaultConfig);
}

let currentRequest;
const currentRequest = getRequestInstance();

export const rawRequest = (url, data, options = {}) => {
if (typeof options === 'string') {
options = {
method: options,
};
}
if (!currentRequest) {
currentRequest = getRequestInstance();
}
return currentRequest(url, data, options);
};

Expand Down

0 comments on commit 421be6c

Please sign in to comment.