This is the approach I am using to increment the field values of my firestore given document field, But it's not incrementing instead it's just resetting the values which I am sending as parameters in increment() function.
import * as firebase from "firebase/app";
\\\\\
this.afs
.collection("orders")
.doc(this.finalDate)
.update({
profit: firebase.firestore.FieldValue.increment(orderProfit),
itemCount: firebase.firestore.FieldValue.increment(itemCount)
});
How can I fix this?