Bugfix in getPathNode

This commit is contained in:
Asger F
2022-10-07 09:22:07 +02:00
parent 88bfd19c91
commit 0f6100cc42

View File

@@ -73,7 +73,7 @@ export function getPath(sarif: sarif.Log, key: Path | PathNode): sarif.ThreadFlo
export function getPathNode(sarif: sarif.Log, key: PathNode): sarif.Location | undefined {
const path = getPath(sarif, key);
if (path === undefined) return undefined;
return path.locations[key.pathNodeIndex];
return path.locations[key.pathNodeIndex]?.location;
}
/**