Update coop-state.ts

This commit is contained in:
Steve Ruiz 2021-07-04 21:27:57 +01:00
parent a315f8e9a6
commit 11b157dc88

View file

@ -61,6 +61,7 @@ const coopState = createState({
},
setOthers(data, payload: { others: User<CoopPresence>[] }) {
const { others } = payload
if (!others) return
data.others = Object.fromEntries(
others.map((user) => [user.connectionId, user])
)