Skip to content

Commit

Permalink
power: Store and forward the used minimum value correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
p3lim committed Nov 20, 2024
1 parent 91d0de9 commit 17963ea
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion elements/power.lua
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,11 @@ local function Update(self, event, unit)
end

local cur, max = UnitPower(unit, displayType), UnitPowerMax(unit, displayType)
element:SetMinMaxValues(min or 0, max)
if not min then
min = 0
end

element:SetMinMaxValues(min, max)

if(UnitIsConnected(unit)) then
element:SetValue(cur)
Expand Down

0 comments on commit 17963ea

Please sign in to comment.