From a6f287104d4198479d74e7c27695c9fc7b744c93 Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Tue, 26 Jan 2021 16:55:56 -0500 Subject: fix queuemicrotask usage --- lib/torrent.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') 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')) -- cgit v1.2.3