fix(tracker): fix fetch proxy .apply args check
This commit is contained in:
parent
21f70fd3cb
commit
3902c26971
2 changed files with 3 additions and 2 deletions
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@openreplay/tracker",
|
||||
"description": "The OpenReplay tracker main package",
|
||||
"version": "9.0.12",
|
||||
"version": "9.0.13",
|
||||
"keywords": [
|
||||
"logging",
|
||||
"replay"
|
||||
|
|
|
|||
|
|
@ -131,6 +131,7 @@ 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]
|
||||
if (!input) return target.apply(window, argsList)
|
||||
|
||||
const isORUrl =
|
||||
input instanceof URL || typeof input === 'string'
|
||||
|
|
@ -177,7 +178,7 @@ export class FetchProxyHandler<T extends typeof fetch> implements ProxyHandler<T
|
|||
})
|
||||
}
|
||||
|
||||
protected beforeFetch(item: NetworkMessage, input: RequestInfo, init?: RequestInit) {
|
||||
protected beforeFetch(item: NetworkMessage, input: RequestInfo | string, init?: RequestInit) {
|
||||
let url: URL,
|
||||
method = 'GET',
|
||||
requestHeader: HeadersInit = {}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue