Skip to content

Commit

Permalink
Fix possible NullReferenceException
Browse files Browse the repository at this point in the history
  • Loading branch information
tom-englert committed Nov 6, 2023
1 parent ae3b50b commit a0517f0
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 a0517f0

Please sign in to comment.