Permalink
Browse files

Client cleanups.

  • Loading branch information...
1 parent fc4a0b8 commit 4d723734ef0450266b672371961a70623185bf53 @nullobject committed Apr 7, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/client.coffee
View
@@ -47,13 +47,13 @@ module.exports = class Client
_completed: (task) ->
handle = @_getHandle task.id
- handle.callback null, task.data if handle.callback?
+ handle.callback? null, task.data
handle.emit "complete", task.data
@_removeHandle handle
_failed: (task) ->
handle = @_getHandle task.id
- handle.callback task.data if handle.callback?
+ handle.callback? task.data
handle.emit "error", task.data unless handle.listeners("error").length is 0
@_removeHandle handle

0 comments on commit 4d72373

Please sign in to comment.