mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
chore: remove redundant type-check (#11678)
This commit is contained in:
parent
0ac68b4776
commit
3b3b9c385f
@ -371,11 +371,7 @@ export class ChromeTargetManager
|
||||
this.#attachedTargetsBySessionId.set(session.id(), target);
|
||||
}
|
||||
|
||||
if (parentSession instanceof CDPSession) {
|
||||
parentSession.emit(CDPSessionEvent.Ready, session);
|
||||
} else {
|
||||
parentSession.emit(CDPSessionEvent.Ready, session);
|
||||
}
|
||||
parentSession.emit(CDPSessionEvent.Ready, session);
|
||||
|
||||
this.#targetsIdsForInit.delete(target._targetId);
|
||||
if (!isExistingTarget) {
|
||||
|
@ -146,14 +146,14 @@ export class CdpTarget extends Target {
|
||||
|
||||
override browser(): Browser {
|
||||
if (!this.#browserContext) {
|
||||
throw new Error('browserContext is not initialised');
|
||||
throw new Error('browserContext is not initialized');
|
||||
}
|
||||
return this.#browserContext.browser();
|
||||
}
|
||||
|
||||
override browserContext(): BrowserContext {
|
||||
if (!this.#browserContext) {
|
||||
throw new Error('browserContext is not initialised');
|
||||
throw new Error('browserContext is not initialized');
|
||||
}
|
||||
return this.#browserContext;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user