Module:Abilities/utils: Difference between revisionsGive feedback
Jump to navigation
Jump to search
m Ensure value is number when checking value > 0 |
m Fix double negatives |
||
| Line 53: | Line 53: | ||
elseif (type(value) == 'number' and value > 0 and prefix == '') then | elseif (type(value) == 'number' and value > 0 and prefix == '') then | ||
prefix = '+' | prefix = '+' | ||
end | |||
-- Do not assign a minus sign if value is already negative | |||
if (prefix == '-' and value < 0) then | |||
prefix = '' | |||
end | end | ||