diff --git a/packages/bugcollect/src/interceptor/HttpInterceptor.ts b/packages/bugcollect/src/interceptor/HttpInterceptor.ts index e289dff..b0a5867 100644 --- a/packages/bugcollect/src/interceptor/HttpInterceptor.ts +++ b/packages/bugcollect/src/interceptor/HttpInterceptor.ts @@ -14,10 +14,10 @@ export const HttpInterceptor = { start(onError: OnError): void { if (_originalFetch) return // already installed - _originalFetch = global.fetch + _originalFetch = globalThis.fetch // eslint-disable-next-line @typescript-eslint/no-explicit-any - ;(global as any).fetch = async ( + ;(globalThis as any).fetch = async ( input: RequestInfo | URL, init?: RequestInit, ): Promise => { @@ -44,7 +44,7 @@ export const HttpInterceptor = { stop(): void { if (_originalFetch) { // eslint-disable-next-line @typescript-eslint/no-explicit-any - ;(global as any).fetch = _originalFetch + ;(globalThis as any).fetch = _originalFetch _originalFetch = null } },