Skip to content

Commit

Permalink
Dismiss may be called after the Bottomsheet was dismissed already.
Browse files Browse the repository at this point in the history
  • Loading branch information
borrmann authored and paulvarache committed Feb 12, 2024
1 parent e81a463 commit 9ccdfac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Platforms/Android/BottomSheetHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ partial void PlatformUpdateHandleColor(BottomSheet view)

partial void Dismiss(BottomSheet view, object request)
{
view.Controller?.Dismiss((bool)request);
view?.Controller?.Dismiss((bool)request);
}

partial void PlatformUpdateSelectedDetent(BottomSheet view)
Expand Down
4 changes: 2 additions & 2 deletions src/Platforms/iOS/BottomSheetHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ partial void PlatformUpdateHandleColor(BottomSheet view)

partial void Dismiss(BottomSheet view, object request)
{
view.CachedDetents.Clear();
view.Controller?.DismissViewController((bool)request, view.NotifyDismissed);
view?.CachedDetents.Clear();
view?.Controller?.DismissViewController((bool)request, view.NotifyDismissed);
}

partial void PlatformMapSelectedDetent(BottomSheet view)
Expand Down

0 comments on commit 9ccdfac

Please sign in to comment.