[Vuejs]-Updating firestore from vue, then reload page to get updated data (not working)

0👍

I’ve played around and found the issue. It was about where i place then then clause.

You can find the updated answer below:

db.collection("partners").doc(uid).get().then(doc => {
    curarr = doc.data().donation_goal
    curarr[curmonth] = newgoal;
    db.collection("partners").doc(uid).update({
        "donation_goal": curarr
    }).then(() => {
        location.reload(true);
    });
})

Leave a comment