Prevent multiple prepare calls
This commit is contained in:
parent
b5d32c73e6
commit
6df5220e02
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user