From c473a10f1dd5fe96df1a34f8a51027efd604c0a3 Mon Sep 17 00:00:00 2001 From: Juan Cortes Ross Date: Wed, 13 Feb 2019 21:24:40 +0100 Subject: [PATCH] LL-1031 toFixed(0) to avoid long decimals --- src/components/Updater/UpdaterContext.js | 3 ++- yarn.lock | 20 +------------------- 2 files changed, 3 insertions(+), 20 deletions(-) diff --git a/src/components/Updater/UpdaterContext.js b/src/components/Updater/UpdaterContext.js index 91351a48..c2eb19ab 100644 --- a/src/components/Updater/UpdaterContext.js +++ b/src/components/Updater/UpdaterContext.js @@ -44,7 +44,8 @@ class Provider extends Component { 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) diff --git a/yarn.lock b/yarn.lock index cae22ea3..dcdf3da4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -13495,17 +13495,7 @@ react-treebeard@^2.1.0: shallowequal "^0.2.2" velocity-react "^1.3.1" -react@*, react@^16.2.0: - version "16.6.1" - resolved "https://registry.yarnpkg.com/react/-/react-16.6.1.tgz#ee2aef4f0a09e494594882029821049772f915fe" - integrity sha512-OtawJThYlvRgm9BXK+xTL7BIlDx8vv21j+fbQDjRRUyok6y7NyjlweGorielTahLZHYIdKUoK2Dp9ByVWuMqxw== - dependencies: - loose-envify "^1.1.0" - object-assign "^4.1.1" - prop-types "^15.6.2" - scheduler "^0.11.0" - -react@^16.6.3: +react@*, react@^16.2.0, react@^16.6.3: version "16.6.3" resolved "https://registry.yarnpkg.com/react/-/react-16.6.3.tgz#25d77c91911d6bbdd23db41e70fb094cc1e0871c" integrity sha512-zCvmH2vbEolgKxtqXL2wmGCUxUyNheYn/C+PD1YAjfxHC54+MhdruyhO7QieQrYsYeTxrn93PM2y0jRH1zEExw== @@ -14424,14 +14414,6 @@ sax@^1.2.4, sax@~1.2.1, sax@~1.2.4: resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== -scheduler@^0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.11.0.tgz#def1f1bfa6550cc57981a87106e65e8aea41a6b5" - integrity sha512-MAYbBfmiEHxF0W+c4CxMpEqMYK+rYF584VP/qMKSiHM6lTkBKKYOJaDiSILpJHla6hBOsVd6GucPL46o2Uq3sg== - dependencies: - loose-envify "^1.1.0" - object-assign "^4.1.1" - scheduler@^0.11.2: version "0.11.3" resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.11.3.tgz#b5769b90cf8b1464f3f3cfcafe8e3cd7555a2d6b"