Not every failure has a stack trace.

This commit is contained in:
Aaron Stockmeister 2023-03-13 12:37:20 -04:00 committed by GitHub
parent e9fa2f582c
commit c37ad22b74
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -19,6 +19,6 @@ export function parseIsoDate(str: string): Date {
}
export function getFirstNonEmptyLine(stackTrace: string): string | undefined {
const lines = stackTrace.split(/\r?\n/g)
return lines.find(str => !/^\s*$/.test(str))
const lines = stackTrace?.split(/\r?\n/g)
return lines?.find(str => !/^\s*$/.test(str))
}