Scaffold web template: Serialize multiples

Fixes #2980
This commit is contained in:
Abe Jellinek 2023-02-23 16:36:59 -05:00
parent cfbfcf20bf
commit 55b17c2b7e

View file

@ -54,11 +54,9 @@ function getSearchResults(doc, checkOnly) {
async function doWeb(doc, url) {
if (detectWeb(doc, url) == 'multiple') {
let items = await Zotero.selectItems(getSearchResults(doc, false));
if (items) {
await Promise.all(
Object.keys(items)
.map(url => requestDocument(url).then(scrape))
);
if (!items) return;
for (let url of Object.keys(items)) {
await scrape(await requestDocument(url));
}
}
else {