fix: prevent erroneous new main frame (#10549)

This commit is contained in:
Adam Raine 2023-07-13 13:11:36 -07:00 committed by GitHub
parent 43556e986e
commit cb46413d87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -69,7 +69,7 @@ export class FrameTree<Frame extends BaseFrame> {
this.#childIds.set(frame._parentId, new Set()); this.#childIds.set(frame._parentId, new Set());
} }
this.#childIds.get(frame._parentId)!.add(frame._id); this.#childIds.get(frame._parentId)!.add(frame._id);
} else { } else if (!this.#mainFrame) {
this.#mainFrame = frame; this.#mainFrame = frame;
} }
this.#waitRequests.get(frame._id)?.forEach(request => { this.#waitRequests.get(frame._id)?.forEach(request => {