Skip to content

Commit

Permalink
chore: logging
Browse files Browse the repository at this point in the history
  • Loading branch information
jmikrut committed Oct 7, 2021
1 parent b72ba7f commit fc72257
Showing 1 changed file with 13 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
});
};

Expand Down

0 comments on commit fc72257

Please sign in to comment.