I'm using SocketStream.
I'm calling @session.save cb response
The error doesn't happen until I pass response into the callback.
开发者_如何学Cresponse is...
{ success: true,
attributes:
{ _id: 00000000,
email: 'test@example.com',
type: 'example'
}
}
Any ideas?
The callback is fired and everything works. The server just crashes with TypeError: boolean is not a function
@session.save cb response
will execute the callback with 'response' as an argument, and then take the result of the callback, and pass it to @session.save. In thise case it looks like the return value of 'cb' is probably a boolean.
Without more info I can only guess, but maybe sommething like this is what you want?
@session.save ->
cb response
精彩评论