Accessing properties of embedded discriminator in array throws error
In my NestJS app, in one of my Mongoose schemas I have embedded discriminators in an array. When iterating over the array and trying to access fields specific to one discriminator, for some reason this field is undefined.