padding for when seconds == 0

Resolves this issue:
![unpadded seconds](https://0x0.st/sAN5.png)
This commit is contained in:
Brian Clinkenbeard
2018-02-22 16:53:01 -08:00
committed by GitHub
parent 7ef9eb5b94
commit f36073a89e

View File

@ -27,7 +27,7 @@ export default class Dater extends React.Component{
// get left-over number of seconds
seconds = total_seconds - (total_minutes * 60 )
if (seconds <= 9) seconds = '0'+ seconds
if (seconds == 0) seconds = '0'
if (seconds == 0) seconds = '00'
// get left-over number of minutes
minutes = total_minutes - (total_hours * 60 )
@ -118,4 +118,4 @@ export default class Dater extends React.Component{
return <span className="dater">{ this.calculate() }</span>
}
}
}
}