Skip to content

Commit 5b9f84c

Browse files
yaira2hishitetsu
andauthored
Fix: Fixed InvalidOperationException when removing page from BackStack (#14698)
Co-authored-by: hishitetsu <66369541+hishitetsu@users.noreply.github.com>
1 parent fda8163 commit 5b9f84c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Files.App/Views/Shells/BaseShellPage.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ public void ResetNavigationStackLayoutMode()
625625

626626
public void RemoveLastPageFromBackStack()
627627
{
628-
ItemDisplay.BackStack.Remove(ItemDisplay.BackStack.Last());
628+
ItemDisplay.BackStack.Remove(ItemDisplay.BackStack.LastOrDefault());
629629
}
630630

631631
public void RaiseContentChanged(IShellPage instance, CustomTabViewItemParameter args)

0 commit comments

Comments
 (0)