Fix possible nil error

This commit is contained in:
Robin 2021-01-16 22:26:33 +01:00
parent 1d4200bd98
commit 8f09767dc6
1 changed files with 4 additions and 2 deletions

View File

@ -1,9 +1,11 @@
local lib = LibStub:NewLibrary("LibCombatLog", 14)
local lib = LibStub:NewLibrary("LibCombatLog", 15)
if not lib then return end
local CombatLogGetCurrentEventInfo = CombatLogGetCurrentEventInfo
lib.mixinTargets = lib.mixinTargets or {}
local mixins = {"RegisterCLEvent", "UnRegisterCLEvent", "RegisterCLSuffix", "UnRegisterCLSuffix", "RegisterCLStatus", "UnRegisterCLStatus","SplitCLEvent"}
lib['regs'] = lib['regs'] or {}
lib['regs'] = lib['regs'] or {
['PLAYER_REGEN'] = {},
}
local allPrefix = {
'SWING', 'RANGE', 'SPELL_PERIODIC', 'SPELL_BUILDING', 'SPELL', 'ENVIRONMENTAL', 'UNIT', 'PARTY', 'ENCHANT'
}