From 24a72cb02f4260fe424ca0d81bed039401be814b Mon Sep 17 00:00:00 2001 From: omicron Date: Wed, 18 Mar 2026 02:41:39 +0100 Subject: [PATCH] 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. --- src/types/unitframe.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/types/unitframe.lua b/src/types/unitframe.lua index e0f8e3b..0289e6e 100644 --- a/src/types/unitframe.lua +++ b/src/types/unitframe.lua @@ -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