api: ignore and skip invalid frame anchors

This commit is contained in:
shagu
2025-07-08 21:49:10 +02:00
parent 3c44018726
commit 6e9f1d6b89
+1
View File
@@ -715,6 +715,7 @@ end
-- 'position' [string] where it should appear, takes the following:
-- "TOP", "RIGHT", "BOTTOM", "LEFT"
function pfUI.api.AlignToPosition(frame, anchor, position, spacing)
if frame == anchor then return end
frame:ClearAllPoints()
if position == "TOP" and anchor then
frame:SetPoint("BOTTOMLEFT", anchor, "TOPLEFT", 0, (spacing or 0))