aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2024-10-24 14:16:06 +0300
committerGravatar Vitaly Takmazov2024-10-24 14:17:56 +0300
commit4bb9c0dd855e1f79308908a97106bf173088cfb8 (patch)
tree1086b11122cb6e9eabfb70218c967fc662cdd929 /contrib
parentd3fce6f548c5bcd208c673bb19a172975d084a56 (diff)
backup.js: fix `no-callbacks-in-promise` lint error
Diffstat (limited to 'contrib')
-rw-r--r--contrib/scripts/backup.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/contrib/scripts/backup.js b/contrib/scripts/backup.js
index 0b1bf89c..8fc2a7f8 100644
--- a/contrib/scripts/backup.js
+++ b/contrib/scripts/backup.js
@@ -20,8 +20,7 @@ function getBlogData(blogUrl, callback) {
blog.searchParams.set('before_mid', msgs.slice(-1).pop().mid)
setTimeout(getBlogData, 1000, blog, callback)
} else {
- // eslint-disable-next-line promise/no-callback-in-promise
- setTimeout(() => callback(), 0)
+ setImmediate(callback)
}
})
.catch(console.error)