optimize JavaScript handling

This commit is contained in:
sbwalker
2023-05-18 14:36:06 -04:00
parent 076d150f72
commit 0b8086bd36
7 changed files with 84 additions and 123 deletions

View File

@ -55,7 +55,6 @@
@Html.Raw(Model.PWAScript)
}
@Html.Raw(Model.BodyResources)
<component type="typeof(Oqtane.Body)" render-mode="@((RenderMode)Enum.Parse(typeof(RenderMode), Model.RenderMode, true))" />
}
else
{

View File

@ -430,8 +430,8 @@ namespace Oqtane.Pages
private void ProcessHeadContent(string headcontent, string id)
{
// iterate scripts
if (headcontent != null)
// add scripts to page
if (!string.IsNullOrEmpty(headcontent))
{
var count = 0;
var index = headcontent.IndexOf("<script");