From ad3375c3fbe7b28c8675b759cd56c8d9216635fb Mon Sep 17 00:00:00 2001 From: Adrian L Lange Date: Sat, 30 Nov 2024 16:11:51 +0100 Subject: [PATCH] power: Store and forward the used minimum value correctly (#695) --- elements/power.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/elements/power.lua b/elements/power.lua index bab26240..caba329f 100644 --- a/elements/power.lua +++ b/elements/power.lua @@ -219,7 +219,8 @@ local function Update(self, event, unit) end local cur, max = UnitPower(unit, displayType), UnitPowerMax(unit, displayType) - element:SetMinMaxValues(min or 0, max) + min = min or 0 -- ensure we always have a minimum value to avoid errors + element:SetMinMaxValues(min, max) if(UnitIsConnected(unit)) then element:SetValue(cur)