Skip to content

Commit

Permalink
Fix matcher null which results in ArgumentNullException (#39873)
Browse files Browse the repository at this point in the history
  • Loading branch information
ViktorHofer authored Mar 28, 2024
1 parent 933e473 commit a8819e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/StaticWebAssetsSdk/Tasks/DefineStaticWebAssets.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public override bool Execute()
{
var candidateMatchPath = GetDiscoveryCandidateMatchPath(candidate);
relativePathCandidate = candidateMatchPath;
if (string.IsNullOrEmpty(candidate.GetMetadata("RelativePath")))
if (matcher != null && string.IsNullOrEmpty(candidate.GetMetadata("RelativePath")))
{
var match = matcher.Match(candidateMatchPath);
if (!match.HasMatches)
Expand Down

0 comments on commit a8819e9

Please sign in to comment.