updated indexing

This commit is contained in:
hydrabolt
2015-10-04 00:00:30 +01:00
parent 780369b90a
commit b130b2400b
5 changed files with 34 additions and 5 deletions

View File

@@ -128,8 +128,10 @@ var Server = (function () {
if (oldRole) {
oldRole.packed = data.permissions;
oldRole.name = data.name;
var index = this.roles.indexOf(oldRole);
this.roles[index] = new ServerPermissions(permissionGroup);
return this.roles[index];
} else {
return false;
}