From b7f39e240eaadb2464fa33460758f283f97d2c16 Mon Sep 17 00:00:00 2001 From: John Cleaver Date: Sat, 5 May 2018 17:41:48 -0400 Subject: [PATCH] Add a function to get an item by id. --- src/store/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/store/index.js b/src/store/index.js index d971128..4bba56b 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -27,6 +27,9 @@ export default new Vuex.Store({ }, GetBundleById: (state) => (bundleId) => { return getById(state.bundles, bundleId) + }, + GetItemById: (state) => (itemId) => { + return getById(state.items, itemId) } }, mutations: {