Skip to content

Commit

Permalink
Minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Numynum committed Sep 2, 2024
1 parent 1e0e08f commit 04e9243
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions SharedUtil.lua
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ function Util:CopyText(text, optionalTitleSuffix)
StaticPopup_Show(self.dialogName, optionalTitleSuffix or '', nil, text);
end

--- @return PlayerSpellsFrame|nil
function Util:GetTalentContainerFrame(noAutoload)
local frameName = 'PlayerSpellsFrame';
if not _G[frameName] and not noAutoload then
Expand All @@ -156,11 +157,12 @@ function Util:GetTalentContainerFrame(noAutoload)
return _G[frameName];
end

--- @return ClassTalentsFrameMixin|nil
function Util:GetTalentFrame(noAutoload)
local talentFrame = self:GetTalentContainerFrame(noAutoload);
if not talentFrame then return; end
local containerFrame = self:GetTalentContainerFrame(noAutoload);
if not containerFrame then return; end

return talentFrame.TalentsTab or talentFrame.TalentsFrame;
return containerFrame.TalentsFrame;
end

function Util:RefreshConfigIDLookup()
Expand Down

0 comments on commit 04e9243

Please sign in to comment.