Update NavigationController.cs

This commit is contained in:
FlorianDahn 2021-07-25 16:40:09 +02:00
parent 47a5b502b9
commit fd7d72b986

View File

@ -121,10 +121,7 @@ namespace TelegramBotBase.Form.Navigation
/// <returns></returns> /// <returns></returns>
public virtual async Task PopToRootAsync() public virtual async Task PopToRootAsync()
{ {
if (Index == 0) while (Index > 0)
return;
while (History.Count > 1)
{ {
await PopAsync(); await PopAsync();
} }