Guard setCurrentViewingUser against undefined from find()
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -74,6 +74,7 @@ export const useAcctMgmtStore = defineStore('acctMgmtStore', {
|
|||||||
*/
|
*/
|
||||||
setCurrentViewingUser(username: string) {
|
setCurrentViewingUser(username: string) {
|
||||||
const userFind = this.allUserAccountList.find(user => user.username === username);
|
const userFind = this.allUserAccountList.find(user => user.username === username);
|
||||||
|
if (!userFind) return;
|
||||||
this.currentViewingUser = userFind;
|
this.currentViewingUser = userFind;
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user