Skip to content

Commit

Permalink
[Azerite Essences] Attempt to Fix nil Error
Browse files Browse the repository at this point in the history
- nil error generated when a character does not have any azerite
essences
  • Loading branch information
Cilraaz committed Jan 26, 2020
1 parent 8b95b99 commit 739708e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions HeroLib/Class/Spell/Azerite.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 739708e

Please sign in to comment.