You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: WooCommerce/src/main/kotlin/com/woocommerce/android/ui/login/sitecredentials/LoginSiteCredentialsViewModel.kt
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -126,7 +126,8 @@ class LoginSiteCredentialsViewModel @Inject constructor(
126
126
127
127
funonContinueClick() = launch {
128
128
loginAnalyticsListener.trackSubmitClicked()
129
-
if (fetchedSiteId.value !=-1) {
129
+
val site = fetchedSiteId.value.takeIf { it !=-1 }?.let { wpApiSiteRepository.getSiteByLocalId(it) }
130
+
if (site?.username !=null) {
130
131
// The login already succeeded, proceed to fetching user info
0 commit comments