diff options
author | Feross Aboukhadijeh <feross@feross.org> | 2021-01-27 00:55:56 +0300 |
---|---|---|
committer | Feross Aboukhadijeh <feross@feross.org> | 2021-01-27 00:55:56 +0300 |
commit | a6f287104d4198479d74e7c27695c9fc7b744c93 (patch) | |
tree | 52a64f8913ec03a5cdeeee4edfa2b989655dd139 /lib | |
parent | 6fd348689d416360bca1405f696c015f77cce835 (diff) |
fix queuemicrotask usage
Diffstat (limited to 'lib')
-rw-r--r-- | lib/torrent.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/torrent.js b/lib/torrent.js index 201a452..abb3b31 100644 --- a/lib/torrent.js +++ b/lib/torrent.js @@ -587,7 +587,7 @@ class Torrent extends EventEmitter { this.store.get(index, (err, buf) => { if (this.destroyed) return cb(new Error('torrent is destroyed')) - if (err) return queueMicrotask(cb, null) // ignore error + if (err) return queueMicrotask(() => cb(null)) // ignore error sha1(buf, hash => { if (this.destroyed) return cb(new Error('torrent is destroyed')) |