mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-24 08:08:15 -05:00
Quick fix for StudentLoginModal error when username or password is not included
This commit is contained in:
parent
4403347290
commit
ac36c0146f
1 changed files with 4 additions and 0 deletions
|
@ -26,6 +26,10 @@ module.exports = class StudentSignInModal extends ModalView
|
|||
auth.loginUser data, (jqxhr) =>
|
||||
error = jqxhr.responseJSON[0]
|
||||
message = _.filter([error.property, error.message]).join(' ')
|
||||
if message is 'Missing credentials'
|
||||
message = 'Enter both username and password'
|
||||
# TODO: Make the server return better error message
|
||||
message = _.string.capitalize(message)
|
||||
@disableModalInProgress(@$el)
|
||||
@$('#errors-alert').text(message).removeClass('hide')
|
||||
|
||||
|
|
Loading…
Reference in a new issue