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: {}
|
value: {}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// load role
|
// load role, first from session, the global, then fail gracefully
|
||||||
const role = this._store.state.roles.get(value);
|
const role =
|
||||||
|
this._store.state.roles.get(value) ||
|
||||||
|
this._store.getters.rolesJSONbyId.get(value) ||
|
||||||
|
{};
|
||||||
this._store.commit("players/update", {
|
this._store.commit("players/update", {
|
||||||
player,
|
player,
|
||||||
property: "role",
|
property: "role",
|
||||||
|
|
Loading…
Reference in New Issue