mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-23 23:58:02 -05:00
Fix checkEmail to prevent duplicate checks
This commit is contained in:
parent
54c1361b1c
commit
151bf93177
1 changed files with 2 additions and 2 deletions
|
@ -56,7 +56,7 @@ module.exports = class BasicInfoView extends CocoView
|
|||
|
||||
checkEmail: ->
|
||||
email = @$('[name="email"]').val()
|
||||
if email is @state.get('lastEmailValue')
|
||||
if email is @state.get('checkEmailValue')
|
||||
return @state.get('checkEmailPromise')
|
||||
|
||||
if not (email and forms.validateEmail(email))
|
||||
|
@ -65,7 +65,7 @@ module.exports = class BasicInfoView extends CocoView
|
|||
checkEmailValue: email
|
||||
checkEmailPromise: null
|
||||
})
|
||||
return
|
||||
return Promise.resolve()
|
||||
|
||||
@state.set({
|
||||
checkEmailState: 'checking'
|
||||
|
|
Loading…
Reference in a new issue