0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-03-03 22:57:08 -05:00

[ci] format

This commit is contained in:
horo 2024-04-11 14:41:22 +00:00 committed by astrobot-houston
parent 742866c566
commit ae12a7e32c

View file

@ -83,29 +83,31 @@ export function createGetCollection({
} else {
const limit = pLimit(10);
entries = await Promise.all(
lazyImports.map((lazyImport) => limit(async () => {
const entry = await lazyImport();
return type === 'content'
? {
id: entry.id,
slug: entry.slug,
body: entry.body,
collection: entry.collection,
data: entry.data,
async render() {
return render({
collection: entry.collection,
id: entry.id,
renderEntryImport: await getRenderEntryImport(collection, entry.slug),
});
},
}
: {
id: entry.id,
collection: entry.collection,
data: entry.data,
};
}))
lazyImports.map((lazyImport) =>
limit(async () => {
const entry = await lazyImport();
return type === 'content'
? {
id: entry.id,
slug: entry.slug,
body: entry.body,
collection: entry.collection,
data: entry.data,
async render() {
return render({
collection: entry.collection,
id: entry.id,
renderEntryImport: await getRenderEntryImport(collection, entry.slug),
});
},
}
: {
id: entry.id,
collection: entry.collection,
data: entry.data,
};
})
)
);
cacheEntriesByCollection.set(collection, entries);
}