Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/webtorrent/webtorrent.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorFeross Aboukhadijeh <feross@feross.org>2016-04-02 11:16:41 +0300
committerFeross Aboukhadijeh <feross@feross.org>2016-04-02 11:16:41 +0300
commit815e9365904756f959787b27958c9786e7202d23 (patch)
tree36776451ce8b4facceac407715142e3c45c5c6f4 /lib
parent84052ad40dc6b788bfc173453a67da155e7804bc (diff)
Fixes for PR #715
Diffstat (limited to 'lib')
-rw-r--r--lib/torrent.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/torrent.js b/lib/torrent.js
index 8bcb2bc..7f583c4 100644
--- a/lib/torrent.js
+++ b/lib/torrent.js
@@ -414,9 +414,10 @@ Torrent.prototype._onMetadata = function (metadata) {
var unchanged = self.files.map(function (_, index) {
return fileModtimes[index] === self._fileModtimes[index]
- }).reduce(function (a, b) {
- return a && b
+ }).every(function (x) {
+ return x
})
+
if (unchanged) {
for (var index = 0; index < self.pieces.length; index++) {
self._markVerified(index)