chore: logging

This commit is contained in:
James
2021-10-07 19:18:49 -04:00
parent b72ba7fe86
commit fc722573bf

View File

@@ -15,14 +15,19 @@ const resaveChildren = (options: Options, collection: CollectionConfig): Collect
});
children.docs.forEach((child) => {
payload.update({
id: child.id,
collection: collection.slug,
data: {
breadcrumbs: populateBreadcrumbs(req, options, collection, child),
},
depth: 0,
});
try {
payload.update({
id: child.id,
collection: collection.slug,
data: {
breadcrumbs: populateBreadcrumbs(req, options, collection, child),
},
depth: 0,
});
} catch (err) {
console.error(`Page ${child.title} failed to update`);
console.error(err);
}
});
};