Merge pull request #314 from mewtaylor/issue/gh-251-ban-undefined

Fix GH-251: log error for session request if there
This commit is contained in:
Matthew Taylor 2016-01-11 08:26:54 -05:00
commit 4ab7cfef6b

View file

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