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);
});
})
Source:stackexchange.com