mirror of
https://github.com/danbulant/Nertivia-Client
synced 2026-06-16 21:11:16 +00:00
fixed: creating roles dont work (with no roles)
This commit is contained in:
parent
b83334103f
commit
32f776cbbd
1 changed files with 4 additions and 1 deletions
|
|
@ -51,7 +51,10 @@ const actions = {
|
|||
},
|
||||
// Roles
|
||||
addRole({ commit, state }, role) {
|
||||
const serverRoles = [...state.roles[role.server_id]];
|
||||
let serverRoles = [];
|
||||
if (state.roles && state.roles[role.server_id]) {
|
||||
serverRoles = [...state.roles[role.server_id]];
|
||||
}
|
||||
serverRoles.push(role);
|
||||
|
||||
commit("UPDATE_SERVER_ROLES", {
|
||||
|
|
|
|||
Loading…
Reference in a new issue