fix: do not wait for extension page targets on connect (#12574)

This commit is contained in:
Alex Rudenko 2024-06-12 10:47:23 +02:00 committed by GitHub
parent 0057f3fe0a
commit 5f2ee98c5b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -122,10 +122,15 @@ export class ChromeTargetManager
this,
undefined
);
// Targets that will not be auto-attached. Therefore, we should
// not add them to #targetsIdsForInit.
const skipTarget =
targetInfo.type === 'browser' ||
targetInfo.url.startsWith('chrome-extension://');
if (
(!this.#targetFilterCallback ||
this.#targetFilterCallback(targetForFilter)) &&
targetInfo.type !== 'browser'
!skipTarget
) {
this.#targetsIdsForInit.add(targetId);
}