Fixed typos and logic error in UnitFrame:Disable

This function is currently unused so these changes are not tested. The
Disable function now always hides the UnitFrame and calls
UnregisterUnitWatch with the correct parameters.
This commit is contained in:
omicron committed 2026-03-18 02:41:39 +01:00
1 parent 851fb5740b
commit 24a72cb02f
1 file changed
+2 -3
+2 -3
View File
@@ -391,10 +391,9 @@ function UnitFrame:Disable()
if self.hideInRaid then
UnregisterAttributeDriver(self.secureFrame, "state-visibility")
elseif self.unit ~= "player" then
UnregisterUnitWatch(self.secure_frame, self.condition)
else
self.secureFrame:Hide()
UnregisterUnitWatch(self.secureFrame, false)
end
self.secureFrame:Hide()
end
-- returns true if this unit is a target unit