From 52b53a4e5379c1a51ff67692fa6d4fbed2ec1753 Mon Sep 17 00:00:00 2001 From: maliming Date: Fri, 14 Mar 2025 10:15:34 +0800 Subject: [PATCH] Remove unnecessary initialization of ScriptFiles and StyleFiles during prerendering --- .../Bundling/AbpScripts.razor | 1 - .../Bundling/AbpStyles.razor | 1 - 2 files changed, 2 deletions(-) diff --git a/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/Bundling/AbpScripts.razor b/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/Bundling/AbpScripts.razor index 234cb04b60..921937a124 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/Bundling/AbpScripts.razor +++ b/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/Bundling/AbpScripts.razor @@ -29,7 +29,6 @@ if (!ApplicationState.TryTakeFromJson(PrerenderedKey, out _)) { // We are in prerendering mode - ScriptFiles = []; if (!BundleName.IsNullOrWhiteSpace()) { ScriptFiles = (await BundleManager.GetScriptBundleFilesAsync(BundleName!)).ToList(); diff --git a/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/Bundling/AbpStyles.razor b/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/Bundling/AbpStyles.razor index 77f3aaa7d1..0b522c02e4 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/Bundling/AbpStyles.razor +++ b/framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/Bundling/AbpStyles.razor @@ -29,7 +29,6 @@ if (!ApplicationState.TryTakeFromJson>(PrerenderedKey, out var scriptFiles)) { // We are in prerendering mode - StyleFiles = []; if (!BundleName.IsNullOrWhiteSpace()) { StyleFiles = (await BundleManager.GetStyleBundleFilesAsync(BundleName!)).ToList();