mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 14:17:22 +01:00
Loaded profile when not cached (#9977)
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user