mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-08-03 12:40:00 +00:00
Merge pull request #315 from sbreiler/develop
Fix percent function to return minimum zero
This commit is contained in:
commit
6b0701cd26
1 changed files with 1 additions and 1 deletions
|
|
@ -199,7 +199,7 @@ api.percent = (x,y, dir) ->
|
|||
when "down" then roundFn = Math.floor
|
||||
else roundFn = Math.round
|
||||
x=1 if x==0
|
||||
roundFn(x/y*100)
|
||||
Math.max(0,roundFn(x/y*100))
|
||||
|
||||
###
|
||||
Remove whitespace #FIXME are we using this anywwhere? Should we be?
|
||||
|
|
|
|||
Loading…
Reference in a new issue