summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPale Moon <git-repo@palemoon.org>2016-10-09 22:40:15 +0200
committerPale Moon <git-repo@palemoon.org>2016-10-09 22:40:15 +0200
commita7bf59564b8d7dedbcbfff6934e40347853397cb (patch)
tree06a39a0f51fa07b49e658a3555b707d9436e1d6e
parent75d4d27b1e2e60085e2be13f08f140906b52fa1a (diff)
downloadpalemoon-gre-a7bf59564b8d7dedbcbfff6934e40347853397cb.tar.gz
Remove deprecated let block in DownloadsCommon.jsm.
-rw-r--r--browser/components/downloads/DownloadsCommon.jsm9
1 files changed, 4 insertions, 5 deletions
diff --git a/browser/components/downloads/DownloadsCommon.jsm b/browser/components/downloads/DownloadsCommon.jsm
index ab2776a7f..0d2113b31 100644
--- a/browser/components/downloads/DownloadsCommon.jsm
+++ b/browser/components/downloads/DownloadsCommon.jsm
@@ -453,13 +453,12 @@ this.DownloadsCommon = {
if (shouldApplySmoothing) {
// Apply hysteresis to favor downward over upward swings. Trust only 30%
// of the new value if lower, and 10% if higher (exponential smoothing).
- let (diff = aSeconds - aLastSeconds) {
- aSeconds = aLastSeconds + (diff < 0 ? .3 : .1) * diff;
- }
-
+ let diff = aSeconds - aLastSeconds;
+ aSeconds = aLastSeconds + (diff < 0 ? .3 : .1) * diff;
+
// If the new time is similar, reuse something close to the last time
// left, but subtract a little to provide forward progress.
- let diff = aSeconds - aLastSeconds;
+ diff = aSeconds - aLastSeconds;
let diffPercent = diff / aLastSeconds * 100;
if (Math.abs(diff) < 5 || Math.abs(diffPercent) < 5) {
aSeconds = aLastSeconds - (diff < 0 ? .4 : .2);