From 396990cd1d8f701cbcc5ec227852a8af3f22dcba Mon Sep 17 00:00:00 2001 From: Ben Finney Date: Wed, 24 Jun 2020 22:32:08 +1000 Subject: [PATCH] Define Map of all known characters. --- src/store/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/store/index.js b/src/store/index.js index ebdcde2..d266d3b 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -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];