Meteor - Updating user profile inside callback -


i'm trying update user profile inside callback, keep gettings same error. tried multiple approaches.. great. thanks!

exception in callback of async function: error: invalid modifier. modifier must object.

        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}}); 

have tried doing this:

let profile = user.profile profile.wallets = wallets meteor.users.update(user._id, {$set: {profile: profile}}) 

because maybe modifier can't dotted path


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -