diff --git a/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Consent.cshtml b/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Consent.cshtml
index fa3efda621..b61ad00152 100644
--- a/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Consent.cshtml
+++ b/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Consent.cshtml
@@ -1,4 +1,4 @@
-@page
+@page
@using Volo.Abp.Account.Web.Pages
@using Volo.Abp.Account.Web.Pages.Account
@model ConsentModel
@@ -25,7 +25,7 @@
Uncheck the permissions you do not wish to grant.
- @if (Model.ConsentInput.IdentityScopes.Any())
+ @if (!Model.ConsentInput.IdentityScopes.IsNullOrEmpty())
{
Personal Information
@@ -55,7 +55,7 @@
}
- @if (Model.ConsentInput.ApiScopes.Any())
+ @if (!Model.ConsentInput.ApiScopes.IsNullOrEmpty())
{
Application Access
diff --git a/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Consent.cshtml.cs b/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Consent.cshtml.cs
index c583005188..2df177b620 100644
--- a/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Consent.cshtml.cs
+++ b/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Consent.cshtml.cs
@@ -106,7 +106,7 @@ namespace Volo.Abp.Account.Web.Pages
}
else
{
- if (ConsentInput.IdentityScopes.Any() || ConsentInput.ApiScopes.Any())
+ if (!ConsentInput.IdentityScopes.IsNullOrEmpty() || !ConsentInput.ApiScopes.IsNullOrEmpty())
{
grantedConsent = new ConsentResponse
{