diff --git a/src/DynamoCoreWpf/ViewModels/PackageManager/PackageManagerSearchViewModel.cs b/src/DynamoCoreWpf/ViewModels/PackageManager/PackageManagerSearchViewModel.cs index f31a7af37f6..f29c36d91b7 100644 --- a/src/DynamoCoreWpf/ViewModels/PackageManager/PackageManagerSearchViewModel.cs +++ b/src/DynamoCoreWpf/ViewModels/PackageManager/PackageManagerSearchViewModel.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Collections.Specialized; @@ -740,6 +740,9 @@ public void RefreshAndSearchAsync() internal void RefreshInfectedPackages() { + //do not call a protected route, if user is not logged in already. + if (PackageManagerClientViewModel.LoginState != Greg.AuthProviders.LoginState.LoggedIn) return; + var infectedPkgs = PackageManagerClientViewModel.GetInfectedPackages(); infectedPkgs.Sort((e1, e2) => e1.InfectedPackageCreationDate.CompareTo(e2.InfectedPackageCreationDate));