Skip to content

Commit b637e24

Browse files
agustingrohisasmendiagus
authored andcommitted
bug:SP-1814 Fixes Nugget parser
Co-authored-by: Agustin Isasmendi <[email protected]>
1 parent 166fb3b commit b637e24

File tree

4 files changed

+14
-5
lines changed

4 files changed

+14
-5
lines changed

Diff for: package-lock.json

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

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "scanoss",
3-
"version": "0.15.2",
3+
"version": "0.15.3",
44
"description": "The SCANOSS JS package provides a simple, easy to consume module for interacting with SCANOSS APIs/Engine.",
55
"main": "build/main/index.js",
66
"typings": "build/main/index.d.ts",

Diff for: src/sdk/Dependencies/LocalDependency/parsers/nugetParser.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export function csprojParser(fileContent: string, filePath: string): Promise<ILo
1515

1616
const packageReference: Array<Element> = [];
1717
itemGroups.forEach(itemGroup => {
18-
itemGroup.elements.forEach(item => {
18+
itemGroup.elements?.forEach(item => {
1919
if (item.name == "PackageReference")
2020
packageReference.push(item);
2121
});
@@ -33,7 +33,7 @@ export function csprojParser(fileContent: string, filePath: string): Promise<ILo
3333
});
3434

3535
} catch (e) {
36-
console.error(e);
36+
console.error("File path:",filePath, e);
3737
return Promise.resolve({file: filePath, purls: []});
3838
}
3939

0 commit comments

Comments
 (0)