Update client dependencies

This commit is contained in:
Ken-Håvard Lieng 2016-03-14 23:22:24 +01:00
parent 42efc20748
commit 81b635a872
18 changed files with 97 additions and 162 deletions

View file

@ -8,8 +8,8 @@ function withReason(message, reason) {
}
export default function handleSocket(socket, { dispatch, getState }) {
socket.onAny(data => {
const type = `SOCKET_${socket.event.toUpperCase()}`;
socket.onAny((event, data) => {
const type = `SOCKET_${event.toUpperCase()}`;
if (Array.isArray(data)) {
dispatch({ type, data });
} else {