I'm facing an issue with my Ionic app while attempting to update records in Firebase. The error message I keep encountering has me stumped as to where I might be going wrong.
Error: Uncaught (in promise): FirebaseError: [code=invalid-argument]: Function CollectionReference.doc() requires its first argument to be of type non-empty string, but it was: a custom Object object
FirebaseError: Function CollectionReference.doc() requires its first argument to be of type non-empty string, but it was: a custom Object object
Below is the function responsible for updating:
updateTodo(todo: Todo, id: string) {
return this.todosCollection.doc(id).update(todo)
}