diff options
| author | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-07-14 00:21:53 +0800 |
|---|---|---|
| committer | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-07-14 00:21:53 +0800 |
| commit | a503e9dd2fb936cf94ab79546161401db06acc40 (patch) | |
| tree | 1f0a2b327980fe6d514ab64aaad60859ef4a1765 /featureClass | |
| parent | bc123d74472c7d8745eb9ca2287b7fcd1f08f35e (diff) | |
| download | SoopyV2-a503e9dd2fb936cf94ab79546161401db06acc40.tar.gz SoopyV2-a503e9dd2fb936cf94ab79546161401db06acc40.tar.bz2 SoopyV2-a503e9dd2fb936cf94ab79546161401db06acc40.zip | |
+ maby fix crash for some people
Diffstat (limited to 'featureClass')
| -rw-r--r-- | featureClass/class.js | 9 | ||||
| -rw-r--r-- | featureClass/featureManager.js | 1 |
2 files changed, 8 insertions, 2 deletions
diff --git a/featureClass/class.js b/featureClass/class.js index dc0ca27..22614b1 100644 --- a/featureClass/class.js +++ b/featureClass/class.js @@ -211,14 +211,19 @@ class Event { if (this.enabled) return this.enabled = true - this.actuallyRegister() + + delay(0, () => { + this.actuallyRegister() + }) } unregister() { if (!this.enabled) return this.enabled = false - this.actuallyUnregister() + delay(0, () => { + this.actuallyUnregister() + }) } actuallyRegister() { } diff --git a/featureClass/featureManager.js b/featureClass/featureManager.js index 9da76c7..0f0edeb 100644 --- a/featureClass/featureManager.js +++ b/featureClass/featureManager.js @@ -414,6 +414,7 @@ class FeatureManager { // } // }) // }else{ + this.eventObjects[event] = register(event, (...args) => { // let start = Date.now() this.triggerEvent(event, args) |
