mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
fix(chromium): prevent errors when frame does not exist when detaching from oopif (#1767)
When navigating away from the page loaded in `goto`, the frame no longer exists. Page.removeFrameSession is called and throws an error. Instead of calling the helper.assert method, moved removeChildFramesRecursively into a conditional. closes #1762
This commit is contained in:
parent
451a6b7904
commit
3167f2d34c
@ -104,8 +104,8 @@ export class CRPage implements PageDelegate {
|
||||
return;
|
||||
// Frame id equals target id.
|
||||
const frame = this._page._frameManager.frame(targetId);
|
||||
assert(frame);
|
||||
this._page._frameManager.removeChildFramesRecursively(frame);
|
||||
if (frame)
|
||||
this._page._frameManager.removeChildFramesRecursively(frame);
|
||||
frameSession.dispose();
|
||||
this._sessions.delete(targetId);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user