Browse Source

Simplify return to null-coalescing return.

Brandon Thetford 1 year ago
parent
commit
9adc9d431b
1 changed files with 1 additions and 6 deletions
  1. 1 6
      Terminal.Gui/View/Layout/ViewLayout.cs

+ 1 - 6
Terminal.Gui/View/Layout/ViewLayout.cs

@@ -580,12 +580,7 @@ public partial class View
                 {
                 {
                     View? deep = FindDeepestView (v, rx, ry, out resultX, out resultY);
                     View? deep = FindDeepestView (v, rx, ry, out resultX, out resultY);
 
 
-                    if (deep is null)
-                    {
-                        return v;
-                    }
-
-                    return deep;
+                    return deep ?? v;
                 }
                 }
             }
             }
         }
         }