fix(tracker): some safety guards

This commit is contained in:
nick-delirium 2023-11-02 11:15:56 +01:00
parent 2202b0f2b4
commit e2a6f4e5a5

View file

@ -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'