Closed
Description
The change argument of the handler for onUpdate
should probably be Change<QueryDocumentSnapshot>
instead of Change<DocumentSnapshot>
, so that change.after.data()
and change.before.data()
return a non undefined object.
See https://github.com/firebase/firebase-functions/blob/master/src/providers/firestore.ts#L205-L212
If that's not the case, please clarify when either of those can be actually undefined
.
[REQUIRED] Version info
firebase-functions: 3.6.0
[REQUIRED] Expected behavior
change.before.data()
and change.after.data()
should have a type of DocumentData
[REQUIRED] Actual behavior
change.before.data()
and change.after.data()
have a type of DocumentData | undefined
Metadata
Metadata
Assignees
Labels
No labels