fixes a single vs first check with render route handler when there might be duplicate routes assigned to a controller
This commit is contained in:
@@ -228,8 +228,9 @@ namespace Umbraco.Web.Mvc
|
|||||||
// If more than one route is found, find one with a matching action
|
// If more than one route is found, find one with a matching action
|
||||||
if (surfaceRoutes.Count() > 1)
|
if (surfaceRoutes.Count() > 1)
|
||||||
{
|
{
|
||||||
surfaceRoute = surfaceRoutes.SingleOrDefault(x =>
|
surfaceRoute = surfaceRoutes.FirstOrDefault(x =>
|
||||||
x.Defaults["action"].ToString().InvariantEquals(postedInfo.ActionName));
|
x.Defaults["action"] != null &&
|
||||||
|
x.Defaults["action"].ToString().InvariantEquals(postedInfo.ActionName));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user