mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-19 06:38:55 +08:00
test: fix empty request error
This commit is contained in:
@@ -48,7 +48,12 @@ if (agent) {
|
||||
};
|
||||
}
|
||||
|
||||
const requestWrapper = (url, options) => {
|
||||
const requestWrapper = (
|
||||
url,
|
||||
options = {
|
||||
headers: {},
|
||||
}
|
||||
) => {
|
||||
options.headers = options.headers || {};
|
||||
const headersLowerCaseKeys = Object.keys(options.headers).map((key) => key.toLowerCase());
|
||||
|
||||
@@ -92,7 +97,7 @@ const httpWrap = (func) => {
|
||||
} else {
|
||||
requestWrapper(url, request);
|
||||
}
|
||||
args[0] = request.url || url;
|
||||
args[0] = request?.url || url;
|
||||
return origin.apply(this, args);
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user