Skip to content

fix(plugin-nested-docs): await populateBreadcrumbs in resaveChildren#16060

Open
fkkehlet wants to merge 1 commit intopayloadcms:mainfrom
fkkehlet:fix/nested-docs-await-populateBreadcrumbs
Open

fix(plugin-nested-docs): await populateBreadcrumbs in resaveChildren#16060
fkkehlet wants to merge 1 commit intopayloadcms:mainfrom
fkkehlet:fix/nested-docs-await-populateBreadcrumbs

Conversation

@fkkehlet
Copy link
Copy Markdown

What?

Add missing await before populateBreadcrumbs() in resaveChildren.ts.

Why?

populateBreadcrumbs() is async (returns Promise<Data>), but the call in resaveChildren.ts is not awaited. The unresolved Promise is passed as data to req.payload.update() instead of the resolved breadcrumb data, which can cause validation errors or silent data corruption when child documents are resaved after a parent change.

How?

Add await before populateBreadcrumbs() on this line.

@KibbeWater
Copy link
Copy Markdown

Duplicate of #16036

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants