diff --git a/dist/index.js b/dist/index.js index 78b2f569..f95b2962 100644 --- a/dist/index.js +++ b/dist/index.js @@ -2195,8 +2195,8 @@ function parseIsoDate(str) { } exports.parseIsoDate = parseIsoDate; function getFirstNonEmptyLine(stackTrace) { - const lines = stackTrace.split(/\r?\n/g); - return lines.find(str => !/^\s*$/.test(str)); + const lines = stackTrace === null || stackTrace === void 0 ? void 0 : stackTrace.split(/\r?\n/g); + return lines === null || lines === void 0 ? void 0 : lines.find(str => !/^\s*$/.test(str)); } exports.getFirstNonEmptyLine = getFirstNonEmptyLine; diff --git a/src/utils/parse-utils.ts b/src/utils/parse-utils.ts index 44bc3890..a4f4885e 100644 --- a/src/utils/parse-utils.ts +++ b/src/utils/parse-utils.ts @@ -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)) }