From 45845c7bac4de64cb264ea7a45652d3036abee42 Mon Sep 17 00:00:00 2001 From: cha0s Date: Sat, 25 Jul 2020 19:25:17 -0500 Subject: [PATCH] fix: wait for promise --- src/server/packet/join.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/packet/join.js b/src/server/packet/join.js index 4c0cf05..20db0b7 100644 --- a/src/server/packet/join.js +++ b/src/server/packet/join.js @@ -35,7 +35,7 @@ export default { const {req} = socket; const {User} = allModels(); await userJoin(channel, socket.socket); - const state = channelState(req, channel); + const state = await channelState(req, channel); const entries = await Promise.all( state.users.map(async (id) => [id, (await User.findByPk(id)).redditUsername]), );