From 739708e0d101832cdc6f3b1bc9351e31f2dc454c Mon Sep 17 00:00:00 2001 From: Cilraaz Date: Sat, 25 Jan 2020 23:36:56 -0500 Subject: [PATCH] [Azerite Essences] Attempt to Fix nil Error - nil error generated when a character does not have any azerite essences --- HeroLib/Class/Spell/Azerite.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/HeroLib/Class/Spell/Azerite.lua b/HeroLib/Class/Spell/Azerite.lua index fbea0cce..9d601e45 100644 --- a/HeroLib/Class/Spell/Azerite.lua +++ b/HeroLib/Class/Spell/Azerite.lua @@ -102,12 +102,12 @@ function Spell:MinorEssences() table.insert(returnTable, essenceInfo) end end - return returnTable + return returnTable and returnTable or 0 end function Spell:EssenceEnabled(ID, major) if major then - if AzeriteEssences[0].ID == ID then return true end + if AzeriteEssences[0] and AzeriteEssences[0].ID == ID then return true end else for _, essenceInfo in pairs(AzeriteEssences) do for k, v in pairs(essenceInfo) do