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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
1 deletions
-
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) |
|
|
|