Skip to content

Commit

Permalink
Fix error when a dynamic group grower try to SetParent with a string
Browse files Browse the repository at this point in the history
Fixes #4647
  • Loading branch information
mrbuds committed Oct 11, 2023
1 parent 57c68fe commit e48e164
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion WeakAuras/RegionTypes/DynamicGroup.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1372,7 +1372,19 @@ local function modify(parent, region, data)
)
)
then
controlPoint:SetParent(frame == "" and self.relativeTo or frame)
local parent
if frame == "" then
parent = self.relativeTo
else
if type(frame) == "string" then
parent = _G[frame]
else
parent = frame
end
end
if parent and parent.IsObjectType and parent:IsObjectType("Frame") then
controlPoint:SetParent(parent)
end
else
controlPoint:SetParent(self)
end
Expand Down

0 comments on commit e48e164

Please sign in to comment.