summaryrefslogtreecommitdiff
path: root/ext/fg/js/frontend.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-09-07 13:11:25 -0400
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-09-10 20:09:33 -0400
commit99ca60d4c1456f243d8142b4502db441e33340a4 (patch)
treeb4a2743cd62f3c042d8a9e3d499dbaf4dfd94ec4 /ext/fg/js/frontend.js
parentaae971a09e1b48d932126925521cf2d3ba34a41f (diff)
Ensure both Popup and PopupProxy have valid depth
Diffstat (limited to 'ext/fg/js/frontend.js')
-rw-r--r--ext/fg/js/frontend.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/fg/js/frontend.js b/ext/fg/js/frontend.js
index 83e0cef1..5e12d101 100644
--- a/ext/fg/js/frontend.js
+++ b/ext/fg/js/frontend.js
@@ -40,9 +40,9 @@ class Frontend {
static create() {
const initializationData = window.frontendInitializationData;
const isNested = (initializationData !== null && typeof initializationData === 'object');
- const {id, parentFrameId, ignoreNodes} = isNested ? initializationData : {};
+ const {id, depth, parentFrameId, ignoreNodes} = isNested ? initializationData : {};
- const popup = isNested ? new PopupProxy(id, parentFrameId) : PopupProxyHost.instance.createPopup(null);
+ const popup = isNested ? new PopupProxy(depth + 1, id, parentFrameId) : PopupProxyHost.instance.createPopup(null);
const frontend = new Frontend(popup, ignoreNodes);
frontend.prepare();
return frontend;