message56cb50e571cfe40054e5bba8
INFO 2016-02-22 10:18:13 thread id:56cb50e5efa631005c3e92b8
ERROR 2016-02-22 10:18:14 LeanEngine function uncaughtException url=/1/functions/Message/afterSave, msg=RangeError: Maximum call stack size exceeded
AV.Cloud.afterSave("Message", function(request) {
var message = request.object;
var thread = message.get("thread");
var sender = message.get("sender");
console.log("message" + message.id);
thread.disableAfterHook();
thread.fetch().then(function(obj) {
obj.disableAfterHook();
obj.set("last_message", message);
console.log("thread id:" + obj.id);
if (obj.get("sender").id == sender.id) {
obj.increment("receiver_msg_count");
} else {
obj.increment("sender_msg_count");
}
obj.save(null,{
success:function(obj){
console.log("success 2");
},
error: function(obj, error) {
console.log("error");
}
});
});
});
检查了好久不知道为什么会有这个错误