0
이 Meteor 클라이언트 코드는 발견 된 문서를 갱신하지 않습니다. console.log(res)
은 업데이트 할 문서가있을 때 '0'을 인쇄합니다.
왜, 어떻게 고쳐야합니까? 감사합니다cursor.forEach로 문서를 갱신하지 못합니다.
MyCollection.find({
class: 'check-filter'
}).forEach((obj) => {
MyCollecction.update({
obj
}, {
$set: {
class: ''
}
}, (err, res) => {
if (!err) {
console.log(res);
}
});
});