Skip to content
This repository was archived by the owner on Feb 10, 2024. It is now read-only.

Commit 18d4221

Browse files
Merge pull request #47 from Jeavon/issue/controller-method-naming
Allow SurfaceController method names to use whatever case pleases them
2 parents f03a292 + 6342900 commit 18d4221

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Our.Umbraco.DocTypeGridEditor/Web/Extensions/UmbracoHelperExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@ public static bool SurfaceControllerExists(this UmbracoHelper helper, string con
4343
foreach (var method in ctrlInstance.GetType().GetMethods(BindingFlags.Public | BindingFlags.Instance)
4444
.Where(x => typeof(ActionResult).IsAssignableFrom(x.ReturnType)))
4545
{
46-
if (method.Name == actionName)
46+
if (method.Name.InvariantEquals(actionName))
4747
{
4848
return true;
4949
}
5050

5151
var attr = method.GetCustomAttribute<ActionNameAttribute>();
52-
if (attr != null && attr.Name == actionName)
52+
if (attr != null && attr.Name.InvariantEquals(actionName))
5353
{
5454
return true;
5555
}

0 commit comments

Comments
 (0)