Remove redundant check

fixed https://github.com/aspnet/Mvc/issues/8374
This commit is contained in:
Hassan Hashemi 2018-09-04 11:52:44 +04:30 committed by Pranav K
parent 6498c89f88
commit bca3160190
1 changed files with 5 additions and 9 deletions

View File

@ -31,15 +31,11 @@ namespace Microsoft.AspNetCore.Mvc
/// <param name="actionContext">The <see cref="ActionContext"/> to copy.</param>
public ActionContext(ActionContext actionContext)
: this(
actionContext.HttpContext,
actionContext.RouteData,
actionContext.ActionDescriptor,
actionContext.ModelState)
actionContext?.HttpContext,
actionContext?.RouteData,
actionContext?.ActionDescriptor,
actionContext?.ModelState)
{
if (actionContext == null)
{
throw new ArgumentNullException(nameof(actionContext));
}
}
/// <summary>
@ -136,4 +132,4 @@ namespace Microsoft.AspNetCore.Mvc
get; set;
}
}
}
}