Skip to content

Commit d44fb4c

Browse files
author
Keegan Irby
committed
assert that sessionResults are not undefined
1 parent 29c4a07 commit d44fb4c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/core/src/awsService/cloudWatchLogs/commands/tailLogGroup.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ async function handleSessionStream(
7373
) {
7474
try {
7575
for await (const event of stream) {
76-
if (event.sessionUpdate !== undefined) {
77-
const formattedLogEvents = event.sessionUpdate.sessionResults!.map<string>((logEvent) =>
76+
if (event.sessionUpdate !== undefined && event.sessionUpdate.sessionResults !== undefined) {
77+
const formattedLogEvents = event.sessionUpdate.sessionResults.map<string>((logEvent) =>
7878
formatLogEvent(logEvent)
7979
)
8080
if (formattedLogEvents.length !== 0) {

0 commit comments

Comments
 (0)