aboutsummaryrefslogtreecommitdiff
path: root/ext/fg/js/frame-offset-forwarder.js
diff options
context:
space:
mode:
authorsiikamiika <siikamiika@users.noreply.github.com>2020-04-04 16:48:35 +0300
committersiikamiika <siikamiika@users.noreply.github.com>2020-04-05 19:57:37 +0300
commit559033f0a6c2c8c298bd305065e475f0b385cd17 (patch)
treecaf58dd8a4d259f737a3a3de9974d148ff20f810 /ext/fg/js/frame-offset-forwarder.js
parentc171503d77bbae21ddfa2eb49c6a571440f41763 (diff)
default to [0, 0] when sourceFrame is not found
Diffstat (limited to 'ext/fg/js/frame-offset-forwarder.js')
-rw-r--r--ext/fg/js/frame-offset-forwarder.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/fg/js/frame-offset-forwarder.js b/ext/fg/js/frame-offset-forwarder.js
index c32c2ec1..7b417b6e 100644
--- a/ext/fg/js/frame-offset-forwarder.js
+++ b/ext/fg/js/frame-offset-forwarder.js
@@ -80,7 +80,10 @@ class FrameOffsetForwarder {
sourceFrame = frame;
break;
}
- if (sourceFrame === null) { return; }
+ if (sourceFrame === null) {
+ this._forwardFrameOffsetOrigin(null, uniqueId);
+ return;
+ }
const [forwardedX, forwardedY] = offset;
const {x, y} = sourceFrame.getBoundingClientRect();