From 36613d255b22f497c3ffd3533025a1a111cb25df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Mon, 9 Mar 2026 14:10:24 +0800 Subject: [PATCH] Guard setCurrentViewingUser against undefined from find() Co-Authored-By: Claude Opus 4.6 --- src/stores/acctMgmt.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/stores/acctMgmt.ts b/src/stores/acctMgmt.ts index d39dcaf..865fb07 100644 --- a/src/stores/acctMgmt.ts +++ b/src/stores/acctMgmt.ts @@ -74,6 +74,7 @@ export const useAcctMgmtStore = defineStore('acctMgmtStore', { */ setCurrentViewingUser(username: string) { const userFind = this.allUserAccountList.find(user => user.username === username); + if (!userFind) return; this.currentViewingUser = userFind; }, /**