Nameplate.namePlateUnitToken is nil
I'm getting reports of my AddOn TargetNameplateIndicator throwing Lua errors when ElvUI nameplates are enabled. The error appears to be caused by the namePlateUnitToken
field of a nameplate frame being nil
, which I don't believe ever happens with the default nameplates.
An example of the error:
Date: 2018-07-26 20:16:06
ID: 1
Error occured in: Global
Count: 1
Message: ..\AddOns\TargetNameplateIndicator\core.lua line 146:
Usage: UnitIsUnit("unit", "otherUnit")
Debug:
[C]: ?
[C]: UnitIsUnit()
TargetNameplateIndicator\core.lua:146:
TargetNameplateIndicator\core.lua:144
Locals:
Line 146 is this call to UnitIsUnit
with namePlateUnitToken
as the second argument.