开发者

TypeError: boolean is not a function

I'm using SocketStream.

I'm calling @session.save cb response

The error doesn't happen until I pass response into the callback.

开发者_如何学C

response 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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜