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) {
|
setRoles(state, roleIds) {
|
||||||
state.roles = new Map(
|
state.roles = new Map(
|
||||||
rolesJSON
|
roleIds
|
||||||
.filter(r => roleIds.includes(r.id))
|
.filter(roleId => rolesJSONbyId.has(roleId))
|
||||||
.sort((a, b) => b.team.localeCompare(a.team))
|
.sort((a, b) =>
|
||||||
.map(role => [role.id, role])
|
rolesJSONbyId.get(b).team.localeCompare(rolesJSONbyId.get(a).team)
|
||||||
|
)
|
||||||
|
.map(roleId => [roleId, rolesJSONbyId.get(roleId)])
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
setEdition(state, edition) {
|
setEdition(state, edition) {
|
||||||
|
|
Loading…
Reference in New Issue