feat: add support for browser es modules
This commit is contained in:
committed by
Justin Starry
parent
bbae23358c
commit
08ff2d12f2
@@ -26,9 +26,6 @@ export class AgentManager {
|
||||
}
|
||||
|
||||
requestStart(): http.Agent | https.Agent {
|
||||
// $FlowExpectedError - Don't manage agents in the browser
|
||||
if (process.browser) return;
|
||||
|
||||
this._activeRequests++;
|
||||
clearTimeout(this._destroyTimeout);
|
||||
this._destroyTimeout = null;
|
||||
@@ -36,9 +33,6 @@ export class AgentManager {
|
||||
}
|
||||
|
||||
requestEnd() {
|
||||
// $FlowExpectedError - Don't manage agents in the browser
|
||||
if (process.browser) return;
|
||||
|
||||
this._activeRequests--;
|
||||
if (this._activeRequests === 0 && this._destroyTimeout === null) {
|
||||
this._destroyTimeout = setTimeout(() => {
|
||||
|
Reference in New Issue
Block a user