From e1789c51e4f427bfe8aafef23c4a381c155aaaff Mon Sep 17 00:00:00 2001 From: dovholuknf <46322585+dovholuknf@users.noreply.github.com> Date: Tue, 6 Apr 2021 16:20:07 -0400 Subject: [PATCH] fix the blurb when all recovery codes have been used --- DesktopEdge/MainWindow.xaml.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/DesktopEdge/MainWindow.xaml.cs b/DesktopEdge/MainWindow.xaml.cs index 387f0df6..f46d31e8 100644 --- a/DesktopEdge/MainWindow.xaml.cs +++ b/DesktopEdge/MainWindow.xaml.cs @@ -252,8 +252,11 @@ namespace ZitiDesktopEdge { if (IdentityMenu.IsVisible) { if (isComplete) { if (MFASetup.Type == 2) { - if (IdentityMenu.Identity.MFAInfo.RecoveryCodes.Length==0) ShowBlurbAsync("You do not have anymore recovery codes", this.RECOVER); - else ShowRecovery(IdentityMenu.Identity); + if (IdentityMenu.Identity.MFAInfo?.RecoveryCodes?.Length > 0) { + ShowRecovery(IdentityMenu.Identity); + } else { + ShowBlurbAsync("You do not have anymore recovery codes", this.RECOVER); + } } else if (MFASetup.Type == 3) { IdentityMenu.Identity.IsMFAEnabled = false; IdentityMenu.Identity.MFAInfo.IsAuthenticated = false;