fix: allows breadcrumbs to populate without being passed full copy of page data
This commit is contained in:
@@ -6,8 +6,12 @@ import formatBreadcrumb from './formatBreadcrumb';
|
||||
const populateBreadcrumbs = async (req: any, options: Options, collection: CollectionConfig, data: any, originalDoc?: any): Promise<any> => {
|
||||
const newData = data;
|
||||
const breadcrumbDocs = [
|
||||
...await getParents(req, options, collection, data),
|
||||
...await getParents(req, options, collection, {
|
||||
...originalDoc,
|
||||
...data,
|
||||
}),
|
||||
{
|
||||
...originalDoc,
|
||||
...data,
|
||||
id: originalDoc?.id,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user