Skip to content

Commit f3a6ff2

Browse files
authored
Merge pull request #258 from cazou/fix-split-on-undefined
Avoid split on undefined
2 parents 4eb4bc2 + daece30 commit f3a6ff2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

dist/index.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/utils/parse-utils.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ export function parseIsoDate(str: string): Date {
1919
}
2020

2121
export function getFirstNonEmptyLine(stackTrace: string): string | undefined {
22-
const lines = stackTrace.split(/\r?\n/g)
23-
return lines.find(str => !/^\s*$/.test(str))
22+
const lines = stackTrace?.split(/\r?\n/g)
23+
return lines?.find(str => !/^\s*$/.test(str))
2424
}

0 commit comments

Comments
 (0)