Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 5e324ef

Browse files
committed
Fix enterprise login.
Was throwing a `NullReferenceException` after recent merge.
1 parent b2c1ca5 commit 5e324ef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/GitHub.App/ViewModels/Dialog/LoginToGitHubForEnterpriseViewModel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public LoginToGitHubForEnterpriseViewModel(
5858
this.WhenAnyValue(x => x.EnterpriseUrl, x => x.EnterpriseUrlValidator.ValidationResult)
5959
.Throttle(TimeSpan.FromMilliseconds(500))
6060
.ObserveOn(RxApp.MainThreadScheduler)
61-
.Subscribe(x => EnterpriseUrlChanged(x.Item1, x.Item2.IsValid));
61+
.Subscribe(x => EnterpriseUrlChanged(x.Item1, x.Item2?.IsValid ?? false));
6262

6363
NavigateLearnMore = ReactiveCommand.CreateAsyncObservable(_ =>
6464
{
@@ -120,7 +120,7 @@ async void EnterpriseUrlChanged(string url, bool valid)
120120

121121
try
122122
{
123-
if (valid)
123+
if (!string.IsNullOrWhiteSpace(url) && valid)
124124
{
125125
IsEnterpriseInstance = SupportsUserNameAndPassword = null;
126126

0 commit comments

Comments
 (0)