fix(webkit): do not access mainFrame when initialization has failed (#1825)
This commit is contained in:
parent
08c8a74e09
commit
5e18378df7
|
|
@ -262,7 +262,7 @@ export class WKPage implements PageDelegate {
|
||||||
}
|
}
|
||||||
if (targetInfo.isPaused)
|
if (targetInfo.isPaused)
|
||||||
this._pageProxySession.send('Target.resume', { targetId: targetInfo.targetId }).catch(debugError);
|
this._pageProxySession.send('Target.resume', { targetId: targetInfo.targetId }).catch(debugError);
|
||||||
if (this._page.mainFrame().url() === '') {
|
if ((pageOrError instanceof Page) && this._page.mainFrame().url() === '') {
|
||||||
// Initial empty page has an empty url. We should wait until the first real url has been loaded,
|
// Initial empty page has an empty url. We should wait until the first real url has been loaded,
|
||||||
// even if that url is about:blank. This is especially important for popups, where we need the
|
// even if that url is about:blank. This is especially important for popups, where we need the
|
||||||
// actual url before interacting with it.
|
// actual url before interacting with it.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue