Skip to content

Commit

Permalink
check for existence
Browse files Browse the repository at this point in the history
  • Loading branch information
kodewdle committed Nov 13, 2024
1 parent fd2fd51 commit 4f73d22
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions ElvUI/Core/General/Commands.lua
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,10 @@ do
local switch = lower(msg)
if switch ~= '' then
if switch == 'e' then
E:SortProfilerData('E', E.profiler.data[E])
local data = E.profiler.data[E]
if data then
E:SortProfilerData('E', data)
end
else
for key, module in next, E.modules do
local data = switch == lower(key) and E.profiler.data[module]
Expand All @@ -147,12 +150,15 @@ do
end
end
else
E:SortProfilerData('E', E.profiler.data[E])
local data = E.profiler.data[E]
if data then
E:SortProfilerData('E', data)
end

for key, module in next, E.modules do
local data = E.profiler.data[module]
if data then
E:SortProfilerData(key, data)
local info = E.profiler.data[module]
if info then
E:SortProfilerData(key, info)
end
end
end
Expand Down

0 comments on commit 4f73d22

Please sign in to comment.