I have an ionic app trying to update the records in firebase. I keep on getting this error. Not sure what I am doing 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
this is my update function.
updateTodo(todo: Todo, id: string) {
return this.todosCollection.doc(id).update(todo)
}