我在客户端有这段代码
Template['product'].events
'click .addcart': (event, template) ->
event.preventDefault()
add_this = {"item": 1, "name": "test", "qty": 5, "price": 124}
Meteor.call "Carts.push", add_this
return
在服务器中
Meteor.methods
'Carts.push': (params) ->
console.log params
每次点击按钮添加购物车时,服务器端都会出错
Exception while invoking method 'Carts.push' Error: Did not check() all arguments during call to 'Carts.push'
知道为什么这个错误仍然存在吗?
最佳答案
你有 audit-argument-checks
安装包后,它用于验证您是否检查
传递给方法的所有参数。 check
ing 意味着证明函数的参数类型正确。您可以使用以下方法将其删除:
meteor remove audit-argument-checks
或者check()
你的论点像shown in the docs .
关于javascript - MeteorJS : Error in Meteor. 调用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29593305/