diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2020-02-16 12:23:40 -0500 |
---|---|---|
committer | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2020-02-16 12:23:40 -0500 |
commit | 6df5220e0249fa06865034a44c690f7c640a38ed (patch) | |
tree | ae43e8338c17b0676611c3895e2efc9bd55bf21a /ext/fg/js/float.js | |
parent | b5d32c73e657c882ba6f70b79d4a5e214684f563 (diff) |
Prevent multiple prepare calls
Diffstat (limited to 'ext/fg/js/float.js')
-rw-r--r-- | ext/fg/js/float.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/fg/js/float.js b/ext/fg/js/float.js index 35a78d48..440a9731 100644 --- a/ext/fg/js/float.js +++ b/ext/fg/js/float.js @@ -29,12 +29,16 @@ class DisplayFloat extends Display { }; this._orphaned = false; + this._prepareInvoked = false; yomichan.on('orphaned', () => this.onOrphaned()); window.addEventListener('message', (e) => this.onMessage(e), false); } async prepare(options, popupInfo, url, childrenSupported, scale, uniqueId) { + if (this._prepareInvoked) { return; } + this._prepareInvoked = true; + await super.prepare(options); const {id, depth, parentFrameId} = popupInfo; |