Skip to content

Commit

Permalink
Merge pull request Tencent#428 from tatsunoneko/fix_fetch_request_object
Browse files Browse the repository at this point in the history
在mockFetch中增加对Request对象的支持
  • Loading branch information
Maizify authored Jul 15, 2021
2 parents 507966a + 052431d commit f16c08b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/network/network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,9 @@ class VConsoleNetworkTab extends VConsolePlugin {
}
}

return _fetch(url.toString(), init).then((response) => {
const request = tool.isString(input) ? url.toString() : input;

return _fetch(request, init).then((response) => {
_fetchReponse = response;

item.endTime = +new Date();
Expand Down

0 comments on commit f16c08b

Please sign in to comment.