Merge pull request #4437 from sbwalker/dev

revert modification done for testing purposes only
This commit is contained in:
Shaun Walker 2024-07-19 15:31:24 -04:00 committed by GitHub
commit c92be4f270
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -568,24 +568,20 @@
{
if (!string.IsNullOrEmpty(resource.Url))
{
// if (!resource.Reload)
// {
var url = (resource.Url.Contains("://")) ? resource.Url : alias.BaseUrl + resource.Url;
if (resource.Reload)
if (!resource.Reload)
{
url += "?" + Guid.NewGuid().ToString("N");
}
var url = (resource.Url.Contains("://")) ? resource.Url : alias.BaseUrl + resource.Url;
return "<script" +
((!string.IsNullOrEmpty(resource.Integrity)) ? " integrity=\"" + resource.Integrity + "\"" : "") +
((!string.IsNullOrEmpty(resource.CrossOrigin)) ? " crossorigin=\"" + resource.CrossOrigin + "\"" : "") +
((resource.ES6Module) ? " type=\"module\"" : "") +
" src=\"" + url + "\"></script>"; // src at end of element due to enhanced navigation patch algorithm
// }
// else
// {
// // use custom element which can execute script on every page transition
// return "<page-script src=\"" + resource.Url + "\"></page-script>";
// }
}
else
{
// use custom element which can execute script on every page transition
return "<page-script src=\"" + resource.Url + "\"></page-script>";
}
}
else
{