diff --git a/src/api/export.ts b/src/api/export.ts index 793a102..ba6a9db 100644 --- a/src/api/export.ts +++ b/src/api/export.ts @@ -163,7 +163,6 @@ async function _export({ const cleaned = clean_html(body); const q = yootils.queue(8); - let promise; const base_match = //m.exec(cleaned); const base_href = base_match && get_href(base_match[1]); @@ -180,12 +179,12 @@ async function _export({ const url = resolve(base.href, href); if (url.protocol === protocol && url.host === host) { - promise = q.add(() => handle(url)); + q.add(() => handle(url)); } } } - await promise; + await q.close(); } } }