Skip to content

Commit

Permalink
Only add empty view if it's not null
Browse files Browse the repository at this point in the history
  • Loading branch information
Redth committed Jul 24, 2023
1 parent 916f2af commit 06d1e8d
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,13 +166,13 @@ void UpdateEmptyViewVisibility()

void UpdateEmptyView()
{
if (emptyView != null)
{
if (emptyView is not null)
rootLayout.Children.Remove(emptyView);
}

emptyView = VirtualView?.EmptyView?.ToPlatform(MauiContext);
rootLayout.Children.Add(emptyView);

if (emptyView is not null)
rootLayout.Children.Add(emptyView);

UpdateEmptyViewVisibility();
}
Expand Down

0 comments on commit 06d1e8d

Please sign in to comment.