Add reported missing nil check

Fixes #20 (github)
This commit is contained in:
Parnic
2022-03-25 21:30:54 -05:00
parent 5d8b83e5ef
commit 611f37a1f3

View File

@ -197,7 +197,7 @@ end
function TargetInvuln.prototype:UpdateTargetBuffs(event, unit, isUpdate)
local name, duration, remaining
if not isUpdate then
if not isUpdate or not self.lastUpdateTime then
self.buffName, self.buffDuration, self.buffRemaining = self:GetMaxbuffDuration(self.unit, self.buffList)
else
self.buffRemaining = math.max(0, self.buffRemaining - (GetTime() - self.lastUpdateTime))