Define Map of all known characters.

This commit is contained in:
Ben Finney 2020-06-24 22:32:08 +10:00
parent acd99bc2fb
commit 396990cd1d
1 changed files with 2 additions and 0 deletions

View File

@ -9,6 +9,8 @@ import rolesJSON from "../roles.json";
Vue.use(Vuex);
const rolesJSONbyId = new Map(rolesJSON.map(role => [role.id, role]));
const getRolesByEdition = (edition = "tb") => {
const selectedEdition =
editionJSON.find(({ id }) => id === edition) || editionJSON[0];