log error for session request if there

And only try to update the session if a body is present
This commit is contained in:
Matthew Taylor 2016-01-08 17:19:43 -05:00
parent f88984f254
commit 1382fc48f6

View file

@ -37,11 +37,15 @@ var translations = require('../locales/translations.json');
host: '',
uri: '/session/'
}, function (err, body) {
if (err) return;
if (typeof body !== 'undefined') {
if (body.banned) {
return window.location = body.redirectUrl;
} else {
window.updateSession(body);
}
}
});
};