Client Fixes Oct 1 (#9126)

* fix exp notifications for armoire

* open the profile modal only if data is available
This commit is contained in:
Matteo Pagliazzi
2017-10-02 23:01:27 +02:00
committed by GitHub
parent 4e97355110
commit 47ebee9ae8
4 changed files with 38 additions and 17 deletions

View File

@@ -472,10 +472,15 @@ export default {
});
},
showMemberModal (memberId) {
// @TODO move to action or anyway move from here because it's super duplicate
this.$store.state.profileUser = this.cachedProfileData[memberId];
this.$store.state.profileOptions.startingPage = 'profile';
this.$root.$emit('show::modal', 'profile');
const profile = this.cachedProfileData[memberId];
// Open the modal only if the data is available
if (profile && !profile.rejected) {
// @TODO move to action or anyway move from here because it's super duplicate
this.$store.state.profileUser = profile;
this.$store.state.profileOptions.startingPage = 'profile';
this.$root.$emit('show::modal', 'profile');
}
},
},
};