fix setting player roles to one that is not on the current script (fixes #95)

This commit is contained in:
Steffen 2021-01-22 22:05:16 +01:00
parent 0e7730b2e9
commit 83726b1435
1 changed files with 5 additions and 2 deletions

View File

@ -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",