Skip to content

Commit a1cb163

Browse files
Use correct page for PopupBlockedException
1 parent d49bbd7 commit a1cb163

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/CommunityToolkit.Maui/Views/Popup/PopupPage.shared.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public async Task CloseAsync(PopupResult result, CancellationToken token = defau
103103
else if (Navigation.ModalStack[^1] is ContentPage currentVisibleModalPage
104104
&& currentVisibleModalPage.Content != Content)
105105
{
106-
throw new PopupBlockedException(popupPageToClose);
106+
throw new PopupBlockedException(currentVisibleModalPage);
107107
}
108108

109109
// We call `.ThrowIfCancellationRequested()` again to avoid a race condition where a developer cancels the CancellationToken after we check for an InvalidOperationException

0 commit comments

Comments
 (0)