File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
WooCommerce/Classes/Authentication/WPComLogin Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -87,16 +87,16 @@ final class WPComEmailLoginViewModel: ObservableObject {
8787 }
8888 await startAuthentication ( email: email, isPasswordlessAccount: passwordless)
8989 } catch {
90- if allowAccountCreation,
91- let apiError = error as? WordPressAPIError < WordPressComRestApiEndpointError > ,
92- case let . endpointError( endpointError) = apiError,
93- endpointError. apiErrorCode == Constants . unknownUserErrorCode {
94- // The user does not exist yet, trigger magic link flow for account creation
95- await requestAuthenticationLink ( email: email, forAccountCreation: true )
96- } else {
90+ guard allowAccountCreation,
91+ let apiError = error as? WordPressAPIError < WordPressComRestApiEndpointError > ,
92+ case . endpointError( let endpointError) = apiError,
93+ endpointError. apiErrorCode == Constants . unknownUserErrorCode else {
9794 analytics. track ( event: . JetpackSetup. loginFlow ( step: . emailAddress, failure: error) )
9895 onError ( error. localizedDescription)
96+ return
9997 }
98+
99+ await requestAuthenticationLink ( email: email, forAccountCreation: true )
100100 }
101101 }
102102
You can’t perform that action at this time.
0 commit comments