mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 17:45:40 -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: ->
|
checkEmail: ->
|
||||||
email = @$('[name="email"]').val()
|
email = @$('[name="email"]').val()
|
||||||
if email is @state.get('lastEmailValue')
|
if email is @state.get('checkEmailValue')
|
||||||
return @state.get('checkEmailPromise')
|
return @state.get('checkEmailPromise')
|
||||||
|
|
||||||
if not (email and forms.validateEmail(email))
|
if not (email and forms.validateEmail(email))
|
||||||
|
@ -65,7 +65,7 @@ module.exports = class BasicInfoView extends CocoView
|
||||||
checkEmailValue: email
|
checkEmailValue: email
|
||||||
checkEmailPromise: null
|
checkEmailPromise: null
|
||||||
})
|
})
|
||||||
return
|
return Promise.resolve()
|
||||||
|
|
||||||
@state.set({
|
@state.set({
|
||||||
checkEmailState: 'checking'
|
checkEmailState: 'checking'
|
||||||
|
|
Loading…
Reference in a new issue