MeteorJS:Meteor.call中的错误

我在客户端有这个代码

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 

每次点击button添加购物车我在服务器端出现错误

调用方法“Carts.push”时出现exception错误:在调用“Carts.push”期间未检查()所有参数

任何想法为什么这个错误持续?

你已经安装了audit-argument-checks软件包,它被用来validation你check了传给一个方法的所有参数。 check意味着certificate函数的参数是正确的types。 你可以删除它:

 meteor remove audit-argument-checks 

或者check()你的论点,如文档中所示 。