From b8673df51c6cc4ce6a288f8eb609b7a438a07d82 Mon Sep 17 00:00:00 2001 From: Erika <3019731+Princesseuh@users.noreply.github.com> Date: Fri, 4 Oct 2024 14:15:46 +0200 Subject: [PATCH] fix: missing body type on content layer entries (#12123) --- .changeset/thin-trains-fold.md | 5 +++++ packages/astro/src/content/types-generator.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/thin-trains-fold.md diff --git a/.changeset/thin-trains-fold.md b/.changeset/thin-trains-fold.md new file mode 100644 index 0000000000..d4df145844 --- /dev/null +++ b/.changeset/thin-trains-fold.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Fixes missing `body` property on CollectionEntry types for content layer entries diff --git a/packages/astro/src/content/types-generator.ts b/packages/astro/src/content/types-generator.ts index 3c0130cf9f..aa5a75a2b7 100644 --- a/packages/astro/src/content/types-generator.ts +++ b/packages/astro/src/content/types-generator.ts @@ -497,7 +497,7 @@ async function writeContentFiles({ contentTypesStr += `};\n`; break; case CONTENT_LAYER_TYPE: - dataTypesStr += `${collectionKey}: Record;\n`; + dataTypesStr += `${collectionKey}: Record;\n`; break; case 'data': if (collectionEntryKeys.length === 0) {