Browse Source
Remove unnecessary initialization of ScriptFiles and StyleFiles during prerendering
pull/22357/head
maliming
2 years ago
No known key found for this signature in database
GPG Key ID: A646B9CB645ECEA4
2 changed files with
0 additions and
2 deletions
-
framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/Bundling/AbpScripts.razor
-
framework/src/Volo.Abp.AspNetCore.Components.Web.Theming/Bundling/AbpStyles.razor
|
|
@ -29,7 +29,6 @@ |
|
|
if (!ApplicationState.TryTakeFromJson<string>(PrerenderedKey, out _)) |
|
|
if (!ApplicationState.TryTakeFromJson<string>(PrerenderedKey, out _)) |
|
|
{ |
|
|
{ |
|
|
// We are in prerendering mode |
|
|
// We are in prerendering mode |
|
|
ScriptFiles = []; |
|
|
|
|
|
if (!BundleName.IsNullOrWhiteSpace()) |
|
|
if (!BundleName.IsNullOrWhiteSpace()) |
|
|
{ |
|
|
{ |
|
|
ScriptFiles = (await BundleManager.GetScriptBundleFilesAsync(BundleName!)).ToList(); |
|
|
ScriptFiles = (await BundleManager.GetScriptBundleFilesAsync(BundleName!)).ToList(); |
|
|
|
|
|
@ -29,7 +29,6 @@ |
|
|
if (!ApplicationState.TryTakeFromJson<List<string>>(PrerenderedKey, out var scriptFiles)) |
|
|
if (!ApplicationState.TryTakeFromJson<List<string>>(PrerenderedKey, out var scriptFiles)) |
|
|
{ |
|
|
{ |
|
|
// We are in prerendering mode |
|
|
// We are in prerendering mode |
|
|
StyleFiles = []; |
|
|
|
|
|
if (!BundleName.IsNullOrWhiteSpace()) |
|
|
if (!BundleName.IsNullOrWhiteSpace()) |
|
|
{ |
|
|
{ |
|
|
StyleFiles = (await BundleManager.GetStyleBundleFilesAsync(BundleName!)).ToList(); |
|
|
StyleFiles = (await BundleManager.GetStyleBundleFilesAsync(BundleName!)).ToList(); |
|
|
|