我试图在回调中更新一个用户配置文件,但是我仍然得到了相同的错误。已经尝试过多种方法。任何帮助都会很好。谢谢!
异步函数回调中的异常: Error:无效修饰符。修饰符必须是对象。
let user = Meteor.users.findOne({"profile.wallets.address": d.Address});
let wallets = user.profile.wallets;
wallets[0].amount = d.Amount;
Meteor.users.update(user._id, {$set: {'profile.wallets': wallets}});发布于 2017-09-12 01:15:56
你试过这样做吗?
let profile = user.profile
profile.wallets = wallets
Meteor.users.update(user._id, {$set: {profile: profile}})因为修饰符不可能是虚线路径
https://stackoverflow.com/questions/46166066
复制相似问题