Updating nested discriminated object in document array

I have the following update query:

    await this.teamModel.updateOne(
      { _id: team._id },
        $set: {
          'members.$[m].tasks.$[t].submitted': update.submitted,
          'members.$[m].tasks.$[t].applied': update.applied,
          'members.$[m].tasks.$[t].data': update.data,
        arrayFilters: [{ 'm._id': memberId }, { 't.type': targetTask.type, 't._id': taskId }],

tasks is a discriminated document array in member defined like this:

const tasksArray = TeamMemberSchema.path<MongooseSchema.Types.Array>('tasks');

tasksArray.discriminator('objective-scale', TeamTaskObjectiveScaleSchema);
tasksArray.discriminator('objective-brainstorming', TeamTaskObjectiveBrainstormingSchema);
tasksArray.discriminator('objective-weights', TeamTaskObjectiveWeightsSchema);
tasksArray.discriminator('opinion', TeamTaskOpinionSchema);

However (I assume due to the discriminator), the data field which, unlike submitted & applied, is not a common field of all tasks refuses to update. I added the t.type filter based on this Github Merge Request i found that seems like it should fix my issue. Maybe i’m just misunderstanding how to define the type?