From ae93006446ab362afa2dd72dd4574fb1ac0d5129 Mon Sep 17 00:00:00 2001 From: James Date: Thu, 7 Oct 2021 19:59:17 -0400 Subject: [PATCH] chore: revises logs --- .../src/plugins/breadcrumbs/hooks/resaveChildren.ts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/packages/plugin-nested-docs/src/plugins/breadcrumbs/hooks/resaveChildren.ts b/packages/plugin-nested-docs/src/plugins/breadcrumbs/hooks/resaveChildren.ts index 934eceaf41e..baacbd88efd 100644 --- a/packages/plugin-nested-docs/src/plugins/breadcrumbs/hooks/resaveChildren.ts +++ b/packages/plugin-nested-docs/src/plugins/breadcrumbs/hooks/resaveChildren.ts @@ -14,8 +14,8 @@ const resaveChildren = (options: Options, collection: CollectionConfig): Collect depth: 0, }); - children.docs.forEach((child) => { - try { + try { + children.docs.forEach((child) => { payload.update({ id: child.id, collection: collection.slug, @@ -24,11 +24,10 @@ const resaveChildren = (options: Options, collection: CollectionConfig): Collect }, depth: 0, }); - } catch (err) { - console.error(`Page ${child.title} failed to update`); - console.error(err); - } - }); + }); + } catch (err) { + console.error(err); + } }; // Non-blocking