Commit 1382fc48 authored by Matthew Taylor's avatar Matthew Taylor

log error for session request if there

And only try to update the session if a body is present
parent f88984f2
......@@ -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);
}
}
});
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment