From a7d4cd28f2cdf884c3379bea4700d290781032da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E9=B9=8F?= Date: Mon, 2 Dec 2024 10:22:21 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=98=9F=E4=BA=91sdk?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=94=81=E4=BF=A1=E6=81=AFbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- starCloud.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/starCloud.js b/starCloud.js index ff3e707..7a94545 100644 --- a/starCloud.js +++ b/starCloud.js @@ -1681,13 +1681,15 @@ export const useStarCloudStore = defineStore('starCloud', { } const lockList = getStorage('starLockList') - const index = lockList[this.accountInfo.uid].findIndex( - item => item.lockId === this.lockInfo.lockId - ) - if (index !== -1) { - lockList[this.accountInfo.uid][index] = this.lockInfo + if (lockList[this.accountInfo.uid]) { + const index = lockList[this.accountInfo.uid].findIndex( + item => item.lockId === this.lockInfo.lockId + ) + if (index !== -1) { + lockList[this.accountInfo.uid][index] = this.lockInfo + } + setStorage('starLockList', lockList) } - setStorage('starLockList', lockList) }, // 特征值变化回调 listenCharacteristicValue(res) {