类型错误:布尔值不是函数
我正在使用 SocketStream。
我正在调用 @session.save cb response
在将响应传递到回调中之前,错误不会发生。
回应是...
{ success: true,
attributes:
{ _id: 00000000,
email: '[email protected]',
type: 'example'
}
}
有什么想法吗?
回调被触发,一切正常。服务器因 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.
response is...
{ success: true,
attributes:
{ _id: 00000000,
email: '[email protected]',
type: 'example'
}
}
Any ideas?
The callback is fired and everything works. The server just crashes with TypeError: boolean is not a function
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
@session.save cb response
将执行以 'response' 作为参数的回调,然后获取回调的结果,并将其传递给 @session.save。在这种情况下,“cb”的返回值可能是一个布尔值。没有更多信息我只能猜测,但也许这样的东西就是你想要的?
@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?