mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-08-01 11:40:25 +00:00
Loaded profile when not cached (#9977)
This commit is contained in:
parent
e1e5a6cc34
commit
3bee0446b8
1 changed files with 8 additions and 2 deletions
|
|
@ -197,8 +197,14 @@ export default {
|
|||
|
||||
return false;
|
||||
},
|
||||
showMemberModal (memberId) {
|
||||
const profile = this.cachedProfileData[memberId];
|
||||
async showMemberModal (memberId) {
|
||||
let profile = this.cachedProfileData[memberId];
|
||||
|
||||
if (!profile._id) {
|
||||
const result = await this.$store.dispatch('members:fetchMember', { memberId });
|
||||
this.cachedProfileData[memberId] = result.data.data;
|
||||
profile = result.data.data;
|
||||
}
|
||||
|
||||
// Open the modal only if the data is available
|
||||
if (profile && !profile.rejected) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue