fix(tracker): some safety guards
This commit is contained in:
parent
2202b0f2b4
commit
e2a6f4e5a5
1 changed files with 2 additions and 0 deletions
|
|
@ -131,6 +131,8 @@ export class FetchProxyHandler<T extends typeof fetch> implements ProxyHandler<T
|
|||
public apply(target: T, _: typeof window, argsList: [RequestInfo | URL, RequestInit]) {
|
||||
const input = argsList[0]
|
||||
const init = argsList[1]
|
||||
// @ts-ignore
|
||||
if (!input?.url && !input) return <ReturnType<T>>target.apply(window, argsList)
|
||||
|
||||
const isORUrl =
|
||||
input instanceof URL || typeof input === 'string'
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue