1
0
Эх сурвалжийг харах

fix(plugin): incorrect status for beforeunload hook

charlie 2 жил өмнө
parent
commit
8b406f68c7

+ 2 - 2
libs/src/LSPlugin.core.ts

@@ -911,11 +911,11 @@ class PluginLocal extends EventEmitter<'loaded'
     }
 
     try {
-      this._status = PluginLocalLoadStatus.UNLOADING
-
       const eventBeforeUnload = { unregister }
 
       if (this.loaded) {
+        this._status = PluginLocalLoadStatus.UNLOADING
+
         try {
           await this._caller?.callUserModel(
             AWAIT_LSPMSGFn(LSPMSG_BEFORE_UNLOAD),