diff --git a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Auditing/AbpAuditingMiddleware.cs b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Auditing/AbpAuditingMiddleware.cs index ceff8c5029..10bc9545d7 100644 --- a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Auditing/AbpAuditingMiddleware.cs +++ b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/Auditing/AbpAuditingMiddleware.cs @@ -65,13 +65,8 @@ namespace Volo.Abp.AspNetCore.Auditing } var endpoint = httpContext.GetEndpoint(); - if (endpoint == null) - { - return false; - } - - var actionDescriptor = endpoint.Metadata.GetMetadata(); - if (actionDescriptor != null && !(actionDescriptor is ControllerActionDescriptor)) + var actionDescriptor = endpoint?.Metadata.GetMetadata(); + if (!(actionDescriptor is ControllerActionDescriptor)) { return false; }