Skip to content

Commit

Permalink
Call done
Browse files Browse the repository at this point in the history
  • Loading branch information
bergie committed Oct 23, 2017
1 parent 8c46eab commit dcfed64
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/Callback.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ exports.getComponent = ->
return unless input.hasData 'callback', 'in'
[callback, data] = input.getData 'callback', 'in'
unless typeof callback is 'function'
output.sendDone new Error 'The provided callback must be a function'
output.done new Error 'The provided callback must be a function'
return

# Call the callback when receiving data
try
callback data
catch e
return output.sendDone e
return output.done e
output.done()

0 comments on commit dcfed64

Please sign in to comment.