Skip to content

Commit

Permalink
fix: catch fallback case
Browse files Browse the repository at this point in the history
  • Loading branch information
ascorbic committed Oct 9, 2024
1 parent 4656e65 commit 0a16aa8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/astro/src/content/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export async function getEntryDataAndImages<
): Promise<{ data: TOutputData; imageImports: Array<string> }> {
let data: TOutputData;
// Legacy content collections have 'slug' removed
if (collectionConfig.type === 'content') {
if (collectionConfig.type === 'content' || (collectionConfig as any)._legacy) {
const { slug, ...unvalidatedData } = entry.unvalidatedData;
data = unvalidatedData as TOutputData;
} else {
Expand Down

0 comments on commit 0a16aa8

Please sign in to comment.