From f6df35c6e1293c7a45a9510d57a3e815b1e01a60 Mon Sep 17 00:00:00 2001 From: horo Date: Thu, 11 Apr 2024 14:41:22 +0000 Subject: [PATCH] [ci] format --- packages/astro/src/content/runtime.ts | 48 ++++++++++++++------------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/packages/astro/src/content/runtime.ts b/packages/astro/src/content/runtime.ts index 0ad74de3e537..c4fc8573910b 100644 --- a/packages/astro/src/content/runtime.ts +++ b/packages/astro/src/content/runtime.ts @@ -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); }