Read the dock anchor only once a frame is docked

SetupMenu reads each radio's selection when the dropdown is set up at module load, before any frame is docked, so IsDockAnchor indexed a nil dock parent.
This commit is contained in:
Brues
2026-10-30 22:25:27 -05:00
parent 1b71ee617f
commit 2c7ca8afdd
+3 -1
View File
@@ -529,8 +529,10 @@ pfUI:RegisterModule("unlock", function ()
pfUI.unlock.dock.title:SetPoint("TOP", 0, -5)
-- anchor
-- SetupMenu reads the selection at once, before any frame is docked
local function IsDockAnchor(anchor)
local position = pfUI_config["position"] and pfUI_config["position"][pfUI.unlock.dock.parent.fname]
local drag = pfUI.unlock.dock.parent
local position = drag and pfUI_config["position"] and pfUI_config["position"][drag.fname]
return position and position["xpos"] and (position["anchor"] or "TOPLEFT") == anchor
end