Browse Source

fix(plugin): make the latest user sdk compatible for old plugin core

charlie 3 years ago
parent
commit
1963a9709c
1 changed files with 8 additions and 3 deletions
  1. 8 3
      libs/src/LSPlugin.user.ts

+ 8 - 3
libs/src/LSPlugin.user.ts

@@ -394,9 +394,14 @@ export class LSPluginUser
           this._caller.debugTag = `#${baseInfo.id} [${baseInfo.name}]`
       }
 
-      await this._execCallableAPIAsync('setSDKMetadata', {
-        version: this._version,
-      })
+      try {
+        await this._execCallableAPIAsync('setSDKMetadata', {
+          version: this._version,
+        })
+      } catch (e) {
+        console.warn(e)
+      }
+
 
       callback && callback.call(this, baseInfo)
     } catch (e) {