Skip to content

Commit 3aa9493

Browse files
authored
[StaticWebAssets] Add file to FileWrites even when the content is the same in OverrideHtmlAssetPlaceholders (#49073)
1 parent ca27b94 commit 3aa9493

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/StaticWebAssetsSdk/Tasks/OverrideHtmlAssetPlaceholders.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,8 @@ public override bool Execute()
9393
htmlFilesToRemove.Add(item);
9494

9595
string outputPath = Path.Combine(OutputPath, FileHasher.HashString(item.ItemSpec) + item.GetMetadata("Extension"));
96-
if (this.PersistFileIfChanged(Encoding.UTF8.GetBytes(outputContent), outputPath))
97-
{
98-
fileWrites.Add(outputPath);
99-
}
96+
this.PersistFileIfChanged(Encoding.UTF8.GetBytes(outputContent), outputPath);
97+
fileWrites.Add(outputPath);
10098

10199
var newItem = new TaskItem(outputPath, item.CloneCustomMetadata());
102100
newItem.RemoveMetadata("OriginalItemSpec");

0 commit comments

Comments
 (0)