Skip to content

Commit bb37c4e

Browse files
committed
fixup! fix(@angular/ssr): harden platform destruction and response cleanup guards
1 parent 930d82e commit bb37c4e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎packages/angular/ssr/node/src/response.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export async function writeResponseToNodeResponse(
4545
await source.body.cancel().catch((err) => {
4646
// eslint-disable-next-line no-console
4747
console.error(
48-
`An error occurred while cancelling the response body for: ${destination.req.url}.`,
48+
`An error occurred while cancelling the response body for: ${destination.req?.url ?? 'unknown'}.`,
4949
err,
5050
);
5151
});
@@ -101,7 +101,7 @@ export async function writeResponseToNodeResponse(
101101
reader.cancel(error).catch((err) => {
102102
// eslint-disable-next-line no-console
103103
console.error(
104-
`An error occurred while writing the response body for: ${destination.req.url}.`,
104+
`An error occurred while writing the response body for: ${destination.req?.url ?? 'unknown'}.`,
105105
err,
106106
);
107107
});

0 commit comments

Comments
 (0)