Skip to content
This repository has been archived by the owner on Mar 30, 2018. It is now read-only.

Commit

Permalink
fixing linter troubles
Browse files Browse the repository at this point in the history
  • Loading branch information
stipsan committed Jun 16, 2016
1 parent 6dc41a1 commit 84249d2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/createEventChannel.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ export function createEventChannel(socket, event = 'dispatch') {
return eventChannel(listener => {
const handleEvent = (action, cb) => {
// notify the client that the request is received
'function' === typeof cb && cb()
if (typeof cb === 'function') {
cb()
}
listener(action)
}
socket.on(event, handleEvent)
Expand Down

0 comments on commit 84249d2

Please sign in to comment.