Skip to content

Commit

Permalink
Merge pull request #28 from tom-englert/feature/improvements
Browse files Browse the repository at this point in the history
Fix possible NullReferenceException
  • Loading branch information
sboulema authored Nov 6, 2023
2 parents ae3b50b + a0517f0 commit aaec074
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Services/ProjectService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,9 @@ private static IEnumerable<ProjectItemInTargetFramework> GetPackageReferenceItem
: new PackageReferenceEntry(id, version, versionSource, projectItemInTargetFramework, projectItem.GetMetadataValue("Justification"));
}

internal static bool IsTrue(this ProjectProperty property)
internal static bool IsTrue(this ProjectProperty? property)
{
return "true".Equals(property.EvaluatedValue, StringComparison.OrdinalIgnoreCase);
return "true".Equals(property?.EvaluatedValue, StringComparison.OrdinalIgnoreCase);
}

internal static VersionRange? GetVersion(this ProjectItem projectItem)
Expand Down

0 comments on commit aaec074

Please sign in to comment.