summaryrefslogtreecommitdiff
path: root/frontend/src/redux/players.js
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/redux/players.js')
-rw-r--r--frontend/src/redux/players.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/frontend/src/redux/players.js b/frontend/src/redux/players.js
index 84e24796..2b530ca1 100644
--- a/frontend/src/redux/players.js
+++ b/frontend/src/redux/players.js
@@ -40,5 +40,5 @@ export default (state = initialState, action) => {
}
export const getCurrentPlayer = state => state.players.all && state.players.all[state.players.current]
-export const getPlayers = (state, usernames) => Object.values(state.players.all)
- .filter(p => usernames.indexOf(p.username) !== -1)
+export const getPlayer = (state, username) => state.players.all[username]
+export const getPlayers = (state, usernames) => usernames.map(u => getPlayer(state, u))
bgstack15