Browse Source

Merge pull request #1811 from juan-cortes/LL-1031

LL-1031 toFixed(0) to avoid long decimals
develop
Juan Cortés Ross 6 years ago
committed by GitHub
parent
commit
571ae302b2
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      src/components/Updater/UpdaterContext.js

3
src/components/Updater/UpdaterContext.js

@ -44,7 +44,8 @@ class Provider extends Component<UpdaterProviderProps, UpdaterProviderState> {
this.sub = autoUpdate.send({}).subscribe({
next: e => {
if (e.status === 'download-progress') {
const downloadProgress = e.payload && e.payload.percent ? e.payload.percent : 0
const downloadProgress =
e.payload && e.payload.percent ? e.payload.percent.toFixed(0) : 0
this.setState({ status: e.status, downloadProgress })
} else {
this.setStatus(e.status)

Loading…
Cancel
Save