add null check

This commit is contained in:
sbwalker 2023-05-23 11:16:07 -04:00
parent 03374483e4
commit 452d0af8c9

View File

@ -65,6 +65,8 @@
}
private string AddHeadContent(string headcontent, string content)
{
if (!string.IsNullOrEmpty(content))
{
// format head content, remove scripts, and filter duplicate elements
var elements = (">" + content.Replace("\n", "") + "<").Split("><");
@ -78,6 +80,7 @@
}
}
}
}
return headcontent;
}