Skip to content

Commit a8819e9

Browse files
authored
Fix matcher null which results in ArgumentNullException (#39873)
1 parent 933e473 commit a8819e9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/StaticWebAssetsSdk/Tasks/DefineStaticWebAssets.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public override bool Execute()
8484
{
8585
var candidateMatchPath = GetDiscoveryCandidateMatchPath(candidate);
8686
relativePathCandidate = candidateMatchPath;
87-
if (string.IsNullOrEmpty(candidate.GetMetadata("RelativePath")))
87+
if (matcher != null && string.IsNullOrEmpty(candidate.GetMetadata("RelativePath")))
8888
{
8989
var match = matcher.Match(candidateMatchPath);
9090
if (!match.HasMatches)

0 commit comments

Comments
 (0)