Skip to content

Commit

Permalink
fix(Range): Another nil safety
Browse files Browse the repository at this point in the history
  • Loading branch information
Cilraaz committed Nov 24, 2023
1 parent efaa063 commit ac77398
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion HeroLib/Class/Unit/Range.lua
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,11 @@ local function UpdateRangeSpells()
end

-- Reset the Cache table.
wipe(Cache.Persistent.RangeSpells)
if type(Cache.Persistent.RangeSpells) == "table" then
wipe(Cache.Persistent.RangeSpells)
else
Cache.Persistent.RangeSpells = {}
end
Cache.Persistent.RangeSpells.RangeIndex = {}
Cache.Persistent.RangeSpells.SpellRange = {}
Cache.Persistent.RangeSpells.MinRangeSpells = {}
Expand Down

0 comments on commit ac77398

Please sign in to comment.