From 4bb9c0dd855e1f79308908a97106bf173088cfb8 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 24 Oct 2024 14:16:06 +0300 Subject: backup.js: fix `no-callbacks-in-promise` lint error --- contrib/scripts/backup.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'contrib') 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) -- cgit v1.2.3