mirror of https://github.com/bra1n/townsquare.git
fix setting player roles to one that is not on the current script (fixes #95)
This commit is contained in:
parent
0e7730b2e9
commit
83726b1435
|
@ -443,8 +443,11 @@ class LiveSession {
|
|||
value: {}
|
||||
});
|
||||
} else {
|
||||
// load role
|
||||
const role = this._store.state.roles.get(value);
|
||||
// load role, first from session, the global, then fail gracefully
|
||||
const role =
|
||||
this._store.state.roles.get(value) ||
|
||||
this._store.getters.rolesJSONbyId.get(value) ||
|
||||
{};
|
||||
this._store.commit("players/update", {
|
||||
player,
|
||||
property: "role",
|
||||
|
|
Loading…
Reference in New Issue