fix: remove redundant await while fetching target (#7351)

This patch removes the redundant `await` from the block while fetching the target. The value in the map is a `Target` instance, which itself is not an async resource.
This commit is contained in:
Yash Ladha 2021-06-23 11:54:37 +05:30 committed by GitHub
parent 4ce4110628
commit 083b297a67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -433,7 +433,7 @@ export class Browser extends EventEmitter {
url: 'about:blank',
browserContextId: contextId || undefined,
});
const target = await this._targets.get(targetId);
const target = this._targets.get(targetId);
assert(
await target._initializedPromise,
'Failed to create target for page'