Browse Source

Remove unnecessary initialization of ScriptFiles and StyleFiles during prerendering

pull/22357/head
maliming 1 year ago
parent
commit
52b53a4e53
No known key found for this signature in database GPG Key ID: A646B9CB645ECEA4
  1. 1
      framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/Bundling/AbpScripts.razor
  2. 1
      framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/Bundling/AbpStyles.razor

1
framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/Bundling/AbpScripts.razor

@ -29,7 +29,6 @@
if (!ApplicationState.TryTakeFromJson<string>(PrerenderedKey, out _))
{
// We are in prerendering mode
ScriptFiles = [];
if (!BundleName.IsNullOrWhiteSpace())
{
ScriptFiles = (await BundleManager.GetScriptBundleFilesAsync(BundleName!)).ToList();

1
framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/Bundling/AbpStyles.razor

@ -29,7 +29,6 @@
if (!ApplicationState.TryTakeFromJson<List<string>>(PrerenderedKey, out var scriptFiles))
{
// We are in prerendering mode
StyleFiles = [];
if (!BundleName.IsNullOrWhiteSpace())
{
StyleFiles = (await BundleManager.GetStyleBundleFilesAsync(BundleName!)).ToList();

Loading…
Cancel
Save