Simplify assignment to 'Group[0]' after refining things

This commit is contained in:
Wolfgang Huß 2022-09-13 06:03:50 +02:00
parent 4e845284fc
commit 13e7b1fb9c

View File

@ -438,7 +438,7 @@ export default {
}
},
updateJoinLeave({ myRoleInGroup }) {
this.Group = [{ ...this.Group[0], myRole: myRoleInGroup }] // if we assign it directly "this.group" will not be updated
this.Group[0].myRole = myRoleInGroup
const currentUserInGroupMembers = this.GroupMembers.find(
(user) => user.id === this.currentUser.id,
)