Skip to content

Commit 218b913

Browse files
committed
Update ShellItemRenderer.cs
1 parent a32d0e8 commit 218b913

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellItemRenderer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,11 @@ public override void ViewDidLoad()
114114
{
115115
bool accept = true;
116116
var r = RendererForViewController(viewController);
117-
if (r != null)
117+
if (r is not null)
118118
accept = ((IShellItemController)ShellItem).ProposeSection(r.ShellSection, false);
119119

120120
// Detect back navigation when the user taps on the current section
121-
if (r.ShellSection == _currentSection
121+
if (r is not null && r.ShellSection == _currentSection
122122
&& viewController is ShellSectionRenderer sectionRenderer)
123123
{
124124
sectionRenderer.PopRequested = true;

0 commit comments

Comments
 (0)