'FirebaseError: Expected type 'Zu', but it was: a custom uh object

I tried to update a maped data inside of another mapped object. It shows this message

enter image description here



Solution 1:[1]

The updateDoc() function takes a DocumentReference as first parameter and not a DocumentSnapshot. Try refactoring the code as shown below:

// Pass reference of that document, cityRef in this case
// You can also access the doc ref by `artichoke.ref` as well

updateDoc(cityRef, {
  maxCart: {
    tomato: {
      cart: false
    }
  }
})

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Dharmaraj