Skip to content

Commit 43a7487

Browse files
authored
Allow for null resolved version in package-lock.json (#1397)
1 parent 4e23dde commit 43a7487

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Microsoft.ComponentDetection.Detectors/npm/NpmComponentUtilities.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public static TypedComponent GetTypedComponent(JProperty currentDependency, stri
4343
{
4444
var name = GetModuleName(currentDependency.Name);
4545

46-
var version = currentDependency.Value["version"].ToString();
46+
var version = currentDependency.Value["version"]?.ToString();
4747
var hash = currentDependency.Value["integrity"]?.ToString(); // https://docs.npmjs.com/configuring-npm/package-lock-json.html#integrity
4848

4949
if (!IsPackageNameValid(name))

0 commit comments

Comments
 (0)