Core Version: 10.288
System: dnd5e 2.0.3 (Atropos)
midi-qol 10.0.21 (tposney)
Here the screenshot:
Should be enough to add a check for the undefined actor.getActiveTokens()
actor.getActiveTokens()