diff options
author | Peter Cai <[email protected]> | 2020-02-20 16:07:58 +0800 |
---|---|---|
committer | Peter Cai <[email protected]> | 2020-02-20 16:08:10 +0800 |
commit | ddb6eee9e80baa58bbcc79e75ee812e0777e7343 (patch) | |
tree | 1ecf2a5c828a17fca773649613636a9e1df0bcae | |
parent | b4dfeb8624f31672ca3a36540d49784883ef12ce (diff) | |
download | worker-pastebin-ddb6eee9e80baa58bbcc79e75ee812e0777e7343.tar.gz |
fix progressText
-rw-r--r-- | src/util.coffee | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/util.coffee b/src/util.coffee index 3994203..a05c151 100644 --- a/src/util.coffee +++ b/src/util.coffee @@ -65,8 +65,9 @@ isBrowser = (req) -> # Process progress text progressText = (progress) -> - txt = (progress * 100).toFixed(2) + "%" - if progress < 0.1 + progress = progress * 100 + txt = progress.toFixed(2) + "%" + if progress < 10 "0" + txt else txt |