Skip to content

Commit

Permalink
[Misc] Ease Dependency on Cell's LibGroupInfo (#180)
Browse files Browse the repository at this point in the history
- Make Lib load silent
 - Check for lib table before accessing it

Co-authored-by: inyawfaze <[email protected]>
  • Loading branch information
inyawfaze and inyawfaze authored Nov 18, 2024
1 parent 11a7446 commit b6dcf82
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Widgets/Bars/PowerBar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ local CUF = select(2, ...)
local Cell = CUF.Cell
local F = Cell.funcs
---@type LibGroupInfo
local LGI = LibStub:GetLibrary("LibGroupInfo")
local LGI = LibStub:GetLibrary("LibGroupInfo", true)

---@class CUF.widgets
local W = CUF.widgets
Expand Down Expand Up @@ -36,7 +36,7 @@ local function GetRole(button)
return button.states.role
end

local info = LGI:GetCachedInfo(button.states.guid)
local info = LGI and LGI:GetCachedInfo(button.states.guid)
if not info then return end
return info.role
end
Expand Down

0 comments on commit b6dcf82

Please sign in to comment.