mirror of https://github.com/bra1n/townsquare.git
Store characters in the order specified in the script.
This corrects issue #38 by following the script sequence (not the catalogue of characters) for storing the characters.
This commit is contained in:
parent
8aebece218
commit
ac475e39ce
|
@ -100,10 +100,12 @@ export default new Vuex.Store({
|
|||
},
|
||||
setRoles(state, roleIds) {
|
||||
state.roles = new Map(
|
||||
rolesJSON
|
||||
.filter(r => roleIds.includes(r.id))
|
||||
.sort((a, b) => b.team.localeCompare(a.team))
|
||||
.map(role => [role.id, role])
|
||||
roleIds
|
||||
.filter(roleId => rolesJSONbyId.has(roleId))
|
||||
.sort((a, b) =>
|
||||
rolesJSONbyId.get(b).team.localeCompare(rolesJSONbyId.get(a).team)
|
||||
)
|
||||
.map(roleId => [roleId, rolesJSONbyId.get(roleId)])
|
||||
);
|
||||
},
|
||||
setEdition(state, edition) {
|
||||
|
|
Loading…
Reference in New Issue