From 77c980b3ea2c3222c7ac943022e1af609f01ec4a Mon Sep 17 00:00:00 2001 From: blam Date: Wed, 25 Jan 2023 11:01:00 +0100 Subject: [PATCH] chore: fix code review comments whilst mitch is away Signed-off-by: blam --- packages/cli/src/lib/bundler/bundle.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/cli/src/lib/bundler/bundle.ts b/packages/cli/src/lib/bundler/bundle.ts index ba553b3b76..b26c2f9f0d 100644 --- a/packages/cli/src/lib/bundler/bundle.ts +++ b/packages/cli/src/lib/bundler/bundle.ts @@ -133,7 +133,7 @@ async function build(config: webpack.Configuration, isCi: boolean) { // of the same problem, but confuse the reader with noise. const errorWithContext = applyContextToError( errors[0], - serializedStats.errors?.[0].moduleName || '', + serializedStats.errors?.[0]?.moduleName ?? '', ); throw new Error(errorWithContext); } @@ -141,7 +141,7 @@ async function build(config: webpack.Configuration, isCi: boolean) { const warningsWithContext = warnings.map((warning, i) => { return applyContextToError( warning, - serializedStats.warnings?.[i].moduleName || '', + serializedStats.warnings?.[i]?.moduleName ?? '', ); }); console.log(