Validation object must have at least one operator / meteor mongo

后端 未结 2 1959
慢半拍i
慢半拍i 2021-01-19 03:11

I wrote a method to a user\'s address to a collection. However, i keep getting the error:

When the modifier option is true, validation object must have at le         


        
2条回答
  •  孤城傲影
    2021-01-19 03:54

    Yeah, that error kinda sends you in the wrong direction. Regardless, you're using $addToSet on an object. Do this:

    Meteor.users.update(currentUserId, {$set: addressDetails.address}
    

提交回复
热议问题