Skip to content

Commit cb46413

Browse files
authoredJul 13, 2023
fix: prevent erroneous new main frame (#10549)
1 parent 43556e9 commit cb46413

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎packages/puppeteer-core/src/common/FrameTree.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export class FrameTree<Frame extends BaseFrame> {
6969
this.#childIds.set(frame._parentId, new Set());
7070
}
7171
this.#childIds.get(frame._parentId)!.add(frame._id);
72-
} else {
72+
} else if (!this.#mainFrame) {
7373
this.#mainFrame = frame;
7474
}
7575
this.#waitRequests.get(frame._id)?.forEach(request => {

0 commit comments

Comments
 (0)
Please sign in to comment.