fix: add check for existence of lines in jacoco converter
Signed-off-by: Jonah Back <jonah@jonahback.com>
This commit is contained in:
@@ -83,7 +83,7 @@ export class Jacoco implements Converter {
|
||||
private extractLines(sourcefile: JacocoSourceFile): ParsedLine[] {
|
||||
const parsed: ParsedLine[] = [];
|
||||
|
||||
sourcefile.line.forEach(l => {
|
||||
sourcefile.line?.forEach(l => {
|
||||
parsed.push({
|
||||
number: parseInt(l.$.nr, 10),
|
||||
missed_instructions: parseInt(l.$.mi, 10),
|
||||
|
||||
@@ -79,7 +79,7 @@ export type JacocoSourceFile = {
|
||||
$: {
|
||||
name: string;
|
||||
};
|
||||
line: JacocoLine[];
|
||||
line: JacocoLine[] | undefined;
|
||||
};
|
||||
export type JacocoLine = {
|
||||
$: {
|
||||
|
||||
Reference in New Issue
Block a user