Skip to content

Commit d6ce604

Browse files
committed
fixup! refactor(@angular/build): avoid loading localize tools and babel in i18n inliner worker
1 parent af5be90 commit d6ce604

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎packages/angular/build/src/tools/i18n/i18n-inliner-worker.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,8 @@ function translateMessage(
355355
substitutions,
356356
];
357357
} else {
358-
diagnostics.push({ type: 'error', message: (error as Error).message });
358+
const message = error instanceof Error ? error.message : String(error);
359+
diagnostics.push({ type: 'error', message });
359360

360361
return [messageParts, substitutions];
361362
}

0 commit comments

Comments
 (0)