ERROR TypeError: Cannot read property 'constructor' of undefined
at TransformOperationExecutor.js:207
at Array.find (<anonymous>)
at TransformOperationExecutor.transform (TransformOperationExecutor.js:207)
at TransformOperationExecutor.transform (TransformOperationExecutor.js:266)
at ClassTransformer.classToPlain (ClassTransformer.js:10)
at classToPlain (index.js:8)
at Object.toFirestore (trips.firestore.ts:16)
at ma (index.cjs.js:15983)
at n.set (index.cjs.js:15359)
at AngularFirestoreDocument.set (angular-fire-firestore.js:512)
I was trying to... convert my typescript classes to plain javascript object to save them to firebase.
Here are my classes and my usage:
Here is how I'm trying to convert:
The problem: But I'm getting an elusive error:
Here is a screenshot of my object:
What am I missing?