mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
Loaded profile when not cached (#9977)
This commit is contained in:
@@ -197,8 +197,14 @@ export default {
|
|||||||
|
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
showMemberModal (memberId) {
|
async showMemberModal (memberId) {
|
||||||
const profile = this.cachedProfileData[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
|
// Open the modal only if the data is available
|
||||||
if (profile && !profile.rejected) {
|
if (profile && !profile.rejected) {
|
||||||
|
|||||||
Reference in New Issue
Block a user