Skip to content

Commit

Permalink
Merge pull request #18 from unoplatform/mergify/bp/release/stable/1.1…
Browse files Browse the repository at this point in the history
…/pr-17

fix: Skip empty version property (backport #17)
  • Loading branch information
jeromelaban authored Jun 28, 2024
2 parents 1904d5d + 2bb84b6 commit 9ef62ae
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/NvGet/Extensions/XmlDocumentExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,12 @@ public static PackageIdentity[] GetPackageReferences(this XmlDocument document)

var packageName = string.Concat(nameParts).ToLowerInvariant();

if(NuGetVersion.TryParse(versionProperty.InnerText, out var nugetVersion))
if(!string.IsNullOrWhiteSpace(packageName))
{
references.Add(CreatePackageIdentity(packageName, versionProperty.InnerText));
if(NuGetVersion.TryParse(versionProperty.InnerText, out var nugetVersion))
{
references.Add(CreatePackageIdentity(packageName, versionProperty.InnerText));
}
}
}

Expand Down

0 comments on commit 9ef62ae

Please sign in to comment.