···252252 dispatch({type: 'setIsLoading', value: true})
253253254254 try {
255255- onboardingDispatch({type: 'start'}) // start now to avoid flashing the wrong view
256255 await createAccount({
257256 service: state.serviceUrl,
258257 email: state.email,
···262261 inviteCode: state.inviteCode.trim(),
263262 verificationCode: verificationCode,
264263 })
264264+ /*
265265+ * Must happen last so that if the user has multiple tabs open and
266266+ * createAccount fails, one tab is not stuck in onboarding — Eric
267267+ */
268268+ onboardingDispatch({type: 'start'})
265269 } catch (e: any) {
266266- onboardingDispatch({type: 'skip'}) // undo starting the onboard
267270 let errMsg = e.toString()
268271 if (e instanceof ComAtprotoServerCreateAccount.InvalidInviteCodeError) {
269272 dispatch({