Guard setCurrentViewingUser against undefined from find()
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
1ac3d7cd5b
commit
36613d255b
1 file changed
+1
@@ -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;
|
||||
},
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user