Loaded profile when not cached (#9977)

This commit is contained in:
Keith Holliday
2018-02-09 08:57:55 -07:00
committed by GitHub
parent e1e5a6cc34
commit 3bee0446b8

View File

@@ -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) {