aboutsummaryrefslogtreecommitdiff
path: root/ext/fg
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-09-04 17:55:25 -0400
committerGitHub <noreply@github.com>2020-09-04 17:55:25 -0400
commit4cd1676ddc8cbbf1e8ae645f896a6604677c83fa (patch)
tree6fd7cb57573df3c4cefdec16fc68f7dbb14e2548 /ext/fg
parentd8f488e28c7d2eb0cf84611ea2ea9c26ed57cb1f (diff)
Handle error if _waitForFrontendReady fails when creating a popup proxy (#760)
Diffstat (limited to 'ext/fg')
-rw-r--r--ext/fg/js/frontend.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/fg/js/frontend.js b/ext/fg/js/frontend.js
index 61789473..44690028 100644
--- a/ext/fg/js/frontend.js
+++ b/ext/fg/js/frontend.js
@@ -357,7 +357,12 @@ class Frontend {
async _getIframeProxyPopup() {
const targetFrameId = 0; // Root frameId
- await this._waitForFrontendReady(targetFrameId);
+ try {
+ await this._waitForFrontendReady(targetFrameId);
+ } catch (e) {
+ // Root frame not available
+ return await this._getDefaultPopup();
+ }
const {popupId} = await api.crossFrame.invoke(targetFrameId, 'getPopupInfo');
if (popupId === null) {