Fix missing error on signin when server has gone away

no issue
- `session.authenticate` calls out to jQuery for the ajax request which then raises it's own error but returns nothing when the server is not reachable. This is a quick fix so that we don't error and can pass through to the default error handler in the authentication step.
This commit is contained in:
Kevin Ansfield 2015-11-26 11:14:39 +00:00
parent 03760c3674
commit f2c7e34c3f

View File

@ -26,7 +26,7 @@ export default Ember.Controller.extend(ValidationEngine, {
this.get('session').authenticate(authStrategy, model.get('identification'), model.get('password')).catch(function (error) {
self.toggleProperty('loggingIn');
if (error.errors) {
if (error && error.errors) {
error.errors.forEach(function (err) {
err.message = err.message.htmlSafe();
});