diff --git a/src/extends.ts b/src/extends.ts index ee937d5..bccfa10 100644 --- a/src/extends.ts +++ b/src/extends.ts @@ -333,7 +333,7 @@ ApiCall.prototype.addEventMsg = function (this: ApiCall) { if (Object.keys(this.otherBuff).intersection(Object.keys(msg)).length > 0) this.conn.refreshPower(); break; case 'msg_s2c/LshdChange': - this.conn.lshd[msgKey] && PublicShared.mergeProperty(this.conn.lshd[msgKey], msg); + this.conn?.lshd?.[msgKey] && PublicShared.mergeProperty(this.conn.lshd[msgKey], msg); break; } };