diff --git a/package.json b/package.json index 2790323..d15203b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "markdown-downloader", - "version": "1.0.4", + "version": "1.0.5", "description": "markdown文章下载", "main": "dist/index.js", "scripts": { diff --git a/src/download.js b/src/download.js index 20577ea..12ad4b2 100644 --- a/src/download.js +++ b/src/download.js @@ -36,12 +36,12 @@ export const ajax = (options) => { } xhr.error = (err) => { if (retry--) { - console.log(err) - noop(options.error)(err, xhr) - } else { setTimeout(() => { core(retry - 1) }, 3e3) + } else { + console.log(err) + noop(options.error)(err, xhr) } } if (/post/i.test(options.method)) {