From 6df5220e0249fa06865034a44c690f7c640a38ed Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sun, 16 Feb 2020 12:23:40 -0500 Subject: [PATCH] Prevent multiple prepare calls --- ext/fg/js/float.js | 4 ++++ 1 file changed, 4 insertions(+) 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;