Skip to content

Commit

Permalink
Unitframes: Don't attempt to attach a frame to something thats not there
Browse files Browse the repository at this point in the history
  • Loading branch information
Wutname1 committed Jul 12, 2023
1 parent e509be3 commit aba796d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Modules/UnitFrames/Framework.lua
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ function UF:PositionFrame(unit)
if unit then
local UnitFrame = UF.Unit:Get(unit)
local point, anchor, secondaryPoint, x, y = strsplit(',', positionData[unit])
if not anchor then return end

if UnitFrame.position then
UnitFrame:position(point, anchor, secondaryPoint, x, y, false, true)
Expand All @@ -79,6 +80,7 @@ function UF:PositionFrame(unit)
if not config.isChild then
local UnitFrame = UF.Unit:Get(frameName)
local point, anchor, secondaryPoint, x, y = strsplit(',', positionData[frameName])
if not anchor then return end

if UnitFrame.position then
UnitFrame:position(point, anchor, secondaryPoint, x, y, false, true)
Expand Down

0 comments on commit aba796d

Please sign in to comment.