This commit is contained in:
Liwanyi 2022-12-20 11:15:46 +08:00
parent fc65669e07
commit 11b33016db
3 changed files with 15 additions and 3 deletions

View File

@ -4,6 +4,14 @@
# CHANGE # CHANGE
## 0.7.8
2022年12月20日
### 修改
- 修复与其他脚本的兼容性问题
## 0.7.7 ## 0.7.7
2022年12月7日 2022年12月7日

File diff suppressed because one or more lines are too long

View File

@ -45,6 +45,10 @@ export default class WuHuTornHelper extends WuhuBase {
// 监听fetch // 监听fetch
let ori_fetch = window.fetch; let ori_fetch = window.fetch;
// 引用解决与其他脚本接管fetch方法引起的兼容性问题
if (Global.getInstance().unsafeWindow) {
ori_fetch = Global.getInstance().unsafeWindow.fetch;
}
let fetchHandle: (string, RequestInit) => Promise<Response> = (url: string, init: RequestInit) => { let fetchHandle: (string, RequestInit) => Promise<Response> = (url: string, init: RequestInit) => {
let startTime = performance.now(); let startTime = performance.now();
Log.info('FETCH调用[' + url + '], init:', init); Log.info('FETCH调用[' + url + '], init:', init);